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

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

java - Reaching JTextField in a DocumentListener -

c# - Add Image in a stackpanel based on textbox input -