Thursday 15 April 2010

c# - Is there anyway to generate custom sql in a linq to entities query? -



c# - Is there anyway to generate custom sql in a linq to entities query? -

i have database have table have columns added/removed client (we can't alter behavior, it's legacy).

this table has foreign key table i've mapped through ef. i'm trying figure out way sort/filter parent table 1 of dynamic columns using ef.

is there anyway add together query column doesn't exist until runtime?

my current solution records, corresponding records in other (dynamic)table dataset, , combine 2 in new class, , sort list of objects.

unfortunately, have no code show working solution isn't want, have no thought start better, optimal solution.

without illustration how or wan't can't help much. if wan't work queries runtime, linq solution:

http://www.c-sharpcorner.com/uploadfile/deveshomar/dynamic-linq-library-in-c-sharp/

c# .net linq entity-framework

No comments:

Post a Comment