vb.net - How to get table dynamic in EntityFramework 5 -
I am switching from LINQ to SQL EntityFramework 5. From LINQ to SQL I have used this function, to get the table just by its type (VB-code):
dim type like type = myObject.GetType () Dim Reference MyEntities = New MyEntities () query = context.GetTable (type) .AsQueryable () Now I'm searching for the same method in EF5 I got a reply on SO, but my reference Do not have a method called CreateObjectSet . Is there a difference between EF4 and EF5, or am I forgetting something? Based on the answer I found that I can use << code> instead of set
CreateObjectSet : GetTable (T as class) (T as unit) as dynamically returns dbContext.Set (T) (I ) Termination function
Comments
Post a Comment