示例#1
0
        public async Task TestMethod_測試InsertShipper()
        {
            var ShipperID = new ShipperModel {
                CompanyName = "Fragile", Phone = "(503) 555-9000"
            };

            var result = await shipperService.InsertShipper(ShipperID);

            Assert.AreEqual(result, 1);
        }
示例#2
0
        public async Task <IActionResult> Post([FromBody] ShipperModel Model)
        {
            var result = await _shippderService.InsertShipper(Model);

            if (result > 0)
            {
                return(StatusCode((int)HttpStatusCode.Created));
            }
            else
            {
                return(BadRequest());
            }
        }