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