public void Update(PolicyModel entity) { MapperHelper <Policy, PolicyModel> utils = new MapperHelper <Policy, PolicyModel>(); var dbEntity = _context.Set <Policy>().Where(x => x.Id == entity.Id).FirstOrDefault(); utils.setValues(dbEntity, entity); _context.Entry(dbEntity).State = EntityState.Modified; _context.SaveChanges(); }
public void Update(CustomerPolicyModel entity) { throw new NotImplementedException(); MapperHelper <CustomerPolicy, CustomerPolicyModel> utils = new MapperHelper <CustomerPolicy, CustomerPolicyModel>(); var dbEntity = _context.Set <CustomerPolicy>().Where(x => x.Id == entity.Id).FirstOrDefault(); utils.setValues(dbEntity, entity); _context.Entry(dbEntity).State = EntityState.Modified; _context.SaveChanges(); }