public SalesmanListBO Create(SalesmanListBO BO) { using (var uow = _facade.UnitOfWork) { _newSalesmanList = uow.SalesmanListRepository.Create(_salesmanListConverter.Convert(BO)); uow.Complete(); return(_salesmanListConverter.Convert(_newSalesmanList)); } }
public IActionResult Post([FromBody] SalesmanListBO BO) { //TODO You dont use modelstate if (!ModelState.IsValid) { return(BadRequest(ModelState)); } return(Ok(_facade.salesmanListService.Create(BO))); }
public SalesmanList Convert(SalesmanListBO BO) { if (BO == null) { return(null); } { return(new SalesmanList() { Id = BO.Id, EmployeeId = BO.EmployeeId, CustomerId = BO.CustomerId, Employee = _empConv.Convert(BO.Employee), Customer = _custConv.Convert(BO.Customer) }); } }