public ActionResult Show(int id)
        {
            var viewModel = _providerMapper.MapToProviderViewModel(_providerService.Get(id));

            ViewBag.Controller = "Provider";

            return(View(viewModel));
        }
Beispiel #2
0
 public ProviderResponseViewModel MapToProviderResponseViewModel(ProviderResponse providerResponse)
 {
     return(new ProviderResponseViewModel
     {
         Id = providerResponse.Id,
         Order = _orderMapper.MapToOrderViewModel(providerResponse.Order),
         Provider = _providerMapper.MapToProviderViewModel(providerResponse.Provider),
         Comment = providerResponse.Comment,
         CreatedAt = providerResponse.CreatedAt,
     });
 }
Beispiel #3
0
 public OrderResponseViewModel MapToOrderResponseViewModel(OrderResponse orderResponse)
 {
     return(new OrderResponseViewModel
     {
         Id = orderResponse.Id,
         Price = orderResponse.Price,
         Comment = orderResponse.Comment,
         Completed = orderResponse.Completed,
         CreatedAt = orderResponse.CreatedAt,
         Order = _orderMapper.MapToOrderViewModel(orderResponse.Order),
         Provider = _providerMapper.MapToProviderViewModel(orderResponse.Provider)
     });
 }