public ActionResult Create(OrderDTO model) { if (!ModelState.IsValid) { return(View(model)); } OrderBL.Create(model, base._DB); return(RedirectToAction("Index", "Product")); }
// POST: api/Order public int Post([FromBody] OrderDTO order) { return(OrderBL.Create(order, base._DB)); }