public async Task <ActionResult <ShipperModel> > GetShipper(int shipperId) { var shipper = await _shipperService.GetById(shipperId); if (shipper == null) { return(NotFound()); } return(_mapper.Map <ShipperModel>(shipper)); }
public IActionResult ShipmentSelect(Guid id) { var shipment = shipperService.GetById(id); Cart cart = SessionHelper.GetProductFromJson <Cart>(HttpContext.Session, "cart"); cart.ShipperId = shipment.ID; SessionHelper.SetProductJson(HttpContext.Session, "cart", cart); return(Json(new { success = true })); }
public ActionResult <ShipperQueryDto> Get(int id) { return(Ok(ShipperService.GetById(id))); }
public IActionResult GetById(int id) { var model = _shipperService.GetById(id); return(new OkObjectResult(model)); }
public async Task <Shipper> GetById(int id) { var shipper = await _shipperService.GetById(id); return(shipper); }