示例#1
0
 private CustomerViewModel ConvertToCustomerViewModel(Customer customer)
 {
     return new CustomerViewModel
     {
         Id = customer.Id,
         Name = customer.Name,
         Country = customer.Country,
         Address = customer.Address
     };
 }
示例#2
0
 public async Task UpdateCustomer(Customer customer)
 {
     _salesContext.Entry(customer).State = EntityState.Modified;
     _salesContext.SaveChanges();
 }
示例#3
0
 async Task ICustomerCommands.UpdateCustomerAsync(Customer customer)
 {
     _salesContext.Entry(customer).State = EntityState.Modified;
     await _salesContext.SaveChangesAsync();
 }