Exemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("ShipperID,CompanyName")] Shipper shipper)
        {
            if (ModelState.IsValid)
            {
                await _shipperService.Create(shipper);

                return(RedirectToAction(nameof(Index)));
            }
            return(View(shipper));
        }
Exemplo n.º 2
0
 public IActionResult Post([FromBody] ShipperDto dto)
 {
     return(Ok(new { id = ShipperService.Create(dto) }));
 }
Exemplo n.º 3
0
        public async Task <Shipper> Create(Shipper shipper)
        {
            var shipperCreate = await _shipperService.Create(shipper);

            return(shipperCreate);
        }
Exemplo n.º 4
0
 public ShipperEntity Create([FromBody] ShipperEntity customerEntity)
 {
     return(shipperService.Create(customerEntity));
 }