public async Task <bool> DeleteLabel(int labelId) { if (labelId <= 0) { return(false); } else { return(await _labelRepository.DeleteLabel(labelId)); } }
public ActionResult Delete(string id) { try { var result = label_repo_.DeleteLabel(id); return(this.Ok()); } catch (Exception ex) { throw ex; } }
public IHttpActionResult DeleteLabel(int id) { var label = _labelRepository.GetLabelById(id); if (label == null) { return(NotFound()); } _labelRepository.DeleteLabel(label); return(Ok(label)); }
public async Task <IActionResult> DeleteLabel(string identcode) { if (!ModelState.IsValid) { return(BadRequest("invalid input, object invalid")); } bool isDeleted = await _labelRepository.DeleteLabel(identcode); if (!isDeleted) { return(StatusCode(410)); } return(Ok()); }
/// <summary> /// Deletes the label. /// </summary> /// <param name="labelid">The labelid.</param> /// <returns></returns> /// <exception cref="Exception"></exception> public async Task <bool> DeleteLabel(int labelid) { try { if (labelid != 0) { return(await _labelRepository.DeleteLabel(labelid)); } else { return(false); } } catch (Exception e) { throw new Exception(e.Message); } }
public async Task <IActionResult> DeleteLabel(int labelId, int issueId) { return(Ok(await _labelRepository.DeleteLabel(labelId, issueId))); }
public bool DeleteLabel(int userID, int labelID) { bool responseData = _labelRepository.DeleteLabel(userID, labelID); return(responseData); }