public async Task <OrderDto> GetAsync(int userId, int id) { var model = await _orderRepository.GetAsync(userId, id); var result = OrderDtoMapper.Map(model); return(result); }
public async Task <IList <OrderDto> > GetAsync(int userId, PagingOptions pagingOptions) { var models = await _orderRepository.GetAsync(userId, null, pagingOptions); var results = OrderDtoMapper.Map(models); return(results); }
public async Task <OrderDto> AddAsync(int userId, OrderDto dto) { var model = OrderMapper.Map(dto); var newModel = await _orderRepository.AddAsync(userId, model); var result = OrderDtoMapper.Map(newModel); return(result); }