LLBLGEN: Linq to LLBGEN don't work

Posted by StreamT on Stack Overflow See other posts from Stack Overflow or by StreamT
Published on 2010-03-08T18:48:25Z Indexed on 2010/03/08 18:51 UTC
Read the original article Hit count: 462

Filed under:
|
|

I want to make custom select from the database table using Linq. We use LLBGEN as ORM solution.

I can't do LINQ query to Entities Collection Class unless I call GetMulti(null) method of it.

Is it possible to do LINQ query to LLBGEN without extracting all table first?

BatchCollection batches = new BatchCollection();                
BatchEntity batch = batches.AsQueryable()
.Where(i => i.RegisterID == 3)
.FirstOrDefault(); // Exception: Sequence don't contains any elements

batches = new BatchCollection();                
batches.GetMulti(null); // I don't want to extract the whole table.
BatchEntity batch = batches.AsQueryable()
.Where(i => i.RegisterID == 3)
.FirstOrDefault(); //Works fine

© Stack Overflow or respective owner

Related posts about llblgen

Related posts about LINQ