public async Task <IActionResult> Delete([FromBody] DeleteReq req) { if (string.IsNullOrWhiteSpace(req.Key)) { this.NotFound("Method Dictionary/Delete params"); } Logger.LogInformation($"Delete dictionary key: {req.Key}"); await _service.Delete(req.Key).ConfigureAwait(false); return(Ok()); }
public ActionResult Delete() { int id = Convert.ToInt32(Request.Form["id"]); DictionaryEntity entity = _dictionaryService.GetEntity(id); if (entity == null) { return(Json(new ResultModel { StatusCode = System.Net.HttpStatusCode.NotFound, Message = $"The entity id {id} is not found" })); } if (_dictionaryService.Delete(entity)) { return(Json(new ResultModel { StatusCode = System.Net.HttpStatusCode.OK, Message = "Success" })); } else { return(Json(new ResultModel { StatusCode = System.Net.HttpStatusCode.InternalServerError, Message = "An Error Occued when deleting DictionaryEntity" })); } }
public Task <IResultModel> Delete([BindRequired] string id) { return(_service.Delete(id)); }
public void Delete(Dictionary obj) { _service.Delete(obj); }
public ActionResult Delete(string[] ids) { var result = dicService.Delete(ids); return(Json(result)); }
public ActionResult Delete(int itemId, int dicId) { _dicService.Delete(itemId, dicId); return(null); }