Question

public ActionResult Edit(int id) 
   { 
       using (var db = new BlogDataEntities()) 
       { 
           return View(db.Blogs.Find(id)); 
       } 
    }

I have been going though this http://msdn.microsoft.com/en-gb/data/gg685489, however in my IDE i am not able to get the method Find() on db.Blogs and i'm using EntityFramework 4.1.0.0, MVC 3 and .NET 4.0

I have even had a look at this http://blogs.msdn.com/b/adonet/archive/2011/01/28/using-dbcontext-in-ef-feature-ctp5-part-3-finding-entities.aspx but cannot get the Find() method.

Any idea why i am not able to get the Find method on db.Blogs?

Was it helpful?

Solution

Please add "ADO.NET DbContext Generator".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top