예제 #1
0
 public IActionResult Post([FromBody] Order order)
 {
     if (ModelState.IsValid)
     {
         _unitOfWork.AddOrder(order);
         return(Ok());
     }
     else
     {
         return(BadRequest());
     }
 }
예제 #2
0
        public void TestAddOrder()
        {
            bool test = unitOfWork.AddOrder(new Order());

            Assert.IsTrue(test);
        }