public IActionResult AddInetMobileOrder([FromBody] AddInetMobileOrdeModel model) { if (!ModelState.IsValid) { return(BadRequest()); } return(Ok(repo.AddInetMobileOrder(model))); }
public bool AddInetMobileOrder(AddInetMobileOrdeModel input) { string res; using (IDbConnection db = new SqlConnection(Global.Connection)) { res = db.Query <string>("sp_AddInetMobileOrder", new { String = input.String, Note = input.Note, Phone = input.Phone }, commandType: CommandType.StoredProcedure).FirstOrDefault(); } return(res == "1"); }