public static Customer UpdateDb(this CustomerViewModel vm, Customer customer) { //customer.Id = vm.Id; customer.Name = vm.Name; customer.SourceId = vm.SourceId; return customer; }
public void Update(Customer entity, bool commit) { if (entity == null) throw new ArgumentNullException("entity"); _db.SaveChanges(); }