MainDbContext appEnt=new MainDbContext(); protected override Emplyee CreateDataObject(Employee ty) { ty = appEnti.Employee.Add(ty); appEnt.SaveChanges(); return ty; } protected override Employee UpdateDataObject(Employee ty) { var storety = appEnt.Employee.Find(ty.ID); appEnt.Entry(storety).CurrentValues.SetValues(ty); appEnt.SaveChanges(); return ty; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)