public bool DeleteTolerance(int id)
{
string sql = "DELETE FROM [TOLERANCE] WHERE [Tolerance_Id] = @Tolerance_Id";
var param = new Dictionary<string, object>();
param.Clear();
param.Add("@Tolerance_Id", id);
var result = DBContext.ExecuteQueryTable(sql, param);
if (result != null)
return true;
return false;
}
public IHttpActionResult DeleteTolerance(int id) { IHttpActionResult ret = null; TolerancesTolerancesModel tol = new TolerancesTolerancesModel(); bool del = tol.DeleteTolerance(id); if (del == true) { ret = Ok("Pavyko"); } else { ret = Ok("failed"); } return ret; }