예제 #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();
 }