2
를 검색, 나는이 유사 가져 오기 실행하고 있습니다 :PetaPoco 인출 만에서는 totalCount하지만 항목 PetaPoco를 사용
이 문서는public class article
{
public long article_id { get; set; }
public string title { get; set; }
public DateTime date_created { get; set; }
public bool draft { get; set; }
public string content { get; set; }
}
그러나 result.TotalItems 동안 정의
var result=db.Page<article>(1, 20, // <-- page number and items per page
"SELECT * FROM articles WHERE [email protected] ORDER BY date_posted DESC", "coolstuff");
올바른 표시 number, result.Items에는 anyting이 포함되지 않습니다. 또한
[PetaPoco.TableName("articles")]
[PetaPoco.PrimaryKey("article_id")]
및 명시 적 열 매핑
[PetaPoco.Column]
와 클래스 문서의 정의를 장식하는 시도했지만 결과는 항상 동일했다. 버그가 있습니까? 아니면 내가 뭘 잘못하고 있습니까?
디버그를 통해 실행했으며 db에 대해 실행되는 정확한 쿼리를 찾았습니까? 이 작업은 수동으로 수행하거나 PetaPoco.Glimpse를 사용할 수 있습니다. – Schotime