I am using Entity Framework 6 but the following code is throwing error. The code is migrated from old EF version where it is working fine.
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.Core.Objects;
using (var context_ = new MyEntities())
{
ObjectSet<FieldHeader> query = context_.CreateObjectSet<FieldHeader>(); /error on this line
replaceField(query, dsSet.Tables[0]);
}
Error
Does not contain a definition for 'CreateObjectSet' and no extension method 'CreateObjectSet'
How can I use it in EF6?
ObjectContexttoDbContextAPI. This error may only be the begin of what you have to do.