Exemple #1
0
 //public void UpdateDepartment (Models.Department department)
 // After AutoMapper
 public void UpdateDepartment(int id, DepartmentDto department)
 {
     //var _department = DBContext.Departments.Single(x => x.Department_ID == id);
     Models.Department _department = iMapper.Map <DepartmentDto, Models.Department>(department);
     DBContext.Entry(_department).State = System.Data.Entity.EntityState.Modified;
     DBContext.SaveChanges();
 }
Exemple #2
0
 public void UpdateRetailer(Models.Retailer retailer)
 {
     DBContext.Entry(retailer).State = System.Data.Entity.EntityState.Modified;
     DBContext.SaveChanges();
 }