示例#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));
        }
示例#2
0
 public IActionResult Post([FromBody] ShipperDto dto)
 {
     return(Ok(new { id = ShipperService.Create(dto) }));
 }
示例#3
0
        public async Task <Shipper> Create(Shipper shipper)
        {
            var shipperCreate = await _shipperService.Create(shipper);

            return(shipperCreate);
        }
示例#4
0
 public ShipperEntity Create([FromBody] ShipperEntity customerEntity)
 {
     return(shipperService.Create(customerEntity));
 }