0

考虑尝试使用 Petapoco.Fetch,其中成员“内容”是一个 c# 对象。

“内容”成员是我存储在缓存中的字节 [] 成员,我想特别检索 .. 而不是从数据库中检索。

所以:

SQL = "select * table.FundDocument";

List<FundDocument> fundDocuments = new List<FundDocument>();
fundDocuments = database.Fetch<FundDocument>(SQL)
                .IgnoreORExcept(FundDocument.content = GetDocumentFromCache(id));

因此,petapoco 对象将获取除成员“内容”之外的所有内容,它将从函数 GetDocumentFromCache(); 中获取。

这可能吗?

4

1 回答 1

0

You can use ExplicitColumns in your POCO and exclude the property from being retrieved or you can name it different, so PetaPoco don't retrieve it.

于 2013-05-02T18:14:49.080 回答