public IActionResult SaveOrder([FromBody] NewOrderShippingInputModel model) { if (!ModelState.IsValid) { return(BadRequest()); } var res = repo.SaveOrder(model); return(Ok(new { Result = res })); }
public bool SaveOrder(NewOrderShippingInputModel input) { string res; using (IDbConnection db = new SqlConnection(Global.Connection)) { res = db.Query <string>("sp_OrderAsSMS", input, commandType: CommandType.StoredProcedure).FirstOrDefault(); } return(res.Length != 0); }