0

Thinking of trying to use Petapoco.Fetch where member "content" is an c# object.

"Content" member is byte[] member which I store in cache og want to retrieve specially .. not from database.

So:

SQL = "select * table.FundDocument";

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

So petapoco object would fetch everything except the member "content", it would fetch that from the function GetDocumentFromCache();

Is this possible?

aghaux
  • 729
  • 4
  • 14
  • 38

1 Answers1

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.

Eduardo Molteni
  • 38,786
  • 23
  • 141
  • 206