コード例 #1
0
ファイル: CustomerController.cs プロジェクト: kimx/Examples
 private CustomerViewModel ConvertToCustomerViewModel(Customer customer)
 {
     return new CustomerViewModel
     {
         Id = customer.Id,
         Name = customer.Name,
         Country = customer.Country,
         Address = customer.Address
     };
 }
コード例 #2
0
ファイル: CustomerCommand.cs プロジェクト: kimx/Examples
 public async Task UpdateCustomer(Customer customer)
 {
     _salesContext.Entry(customer).State = EntityState.Modified;
     _salesContext.SaveChanges();
 }
コード例 #3
0
ファイル: CustomerCommands.cs プロジェクト: p770820/Examples
 async Task ICustomerCommands.UpdateCustomerAsync(Customer customer)
 {
     _salesContext.Entry(customer).State = EntityState.Modified;
     await _salesContext.SaveChangesAsync();
 }