public NetCoreWebAPIs.Core.Models.Customer SaveCustomer(NetCoreWebAPIs.Core.Models.Customer customer) { //TODO fix this manual mess. var entity = new Data.Customer { CustomerId = customer.CustomerId, CustomerName = customer.CustomerName, UpdateDate = DateTime.Now }; customerRepository.Save(entity); customer.CustomerId = entity.CustomerId; return(customer); }
public NetCoreWebAPIs.Core.Models.Customer Post([FromBody] NetCoreWebAPIs.Core.Models.Customer customer) { return(customerService.SaveCustomer(customer)); }