public void Deleteemp(Employee1 employee)
 {
     using (DbConfiguration db = new DbConfiguration())
     {
         db.Employees.Remove(employee);
         db.SaveChanges();
     }
 }
 public void EmployeeMethod(Employee1 employee)
 {
     using (DbConfiguration db = new DbConfiguration())
     {
         db.Add(employee);
         db.SaveChanges();
     }
 }
        public Employee1 updateemp(Employee1 employee)
        {
            using (DbConfiguration db = new DbConfiguration())
            {
                var model = db.Employees.FirstOrDefault(x => x.Id == employee.Id);

                model.Name        = employee.Name;
                model.Designation = employee.Designation;
                model.Code        = employee.Code;
                model.Address     = employee.Address;
                db.SaveChanges();
                return(model);
            }
        }