If you do have a previous class that uses entity framework in visual studio 2010. Then you need to create the same class using visual studio 2012. When you try to copy and paste into the new class. Then compile it, it will give you an error. In visual studio 2010 Addto<tablename> method and DeleteObject method no longer exist. Please use <tablename>.Add method and <tablename>.Remove method respectively.