public SalesPersonDto AllocateSalesPerson( [FromBody] CustomerPreferenceDto customerPreference) { var allocation = _salesPersonAllocator .GetAllocation(customerPreference.ToDomainEntity()); return(allocation == null ? SalesPersonDto.Empty() : SalesPersonDto.FromDomainEntity(allocation)); }
public void Add(CustomerPreferenceDto preference) { PreferenceRepository.Add(Mapper.Map <CustomerPreferenceDto, CustomerPreference>(preference)); UnitOfWork.Commit(); }
public IHttpActionResult Post(CustomerPreferenceDto preference) { CustomerPreferenceService.Add(preference); return(Ok()); }