public void Cnd_AddEmp(CndEmployee emp) { using (var context = new CndContext()) { context.CndEmployees.Add(emp); context.SaveChanges(); } }
static void AddEmp_Cnd() { DAL.CodeFirsApproaches.CndEmployee emp = new DAL.CodeFirsApproaches.CndEmployee { Name = "ashok", Salary=12000, IsTerminated = true }; codeFirstOperations.Cnd_AddEmp(emp); }