public async Task <ActionResult <ApiResult> > Delete(string ids) { await _ActionService.Delete(ids); ApiResult resp = new ApiResult(); resp.code = 0; return(resp); }
public async Task <IActionResult> Delete(int id) { var result = await _actionService.Delete(id); if (!result.IsOk()) { return(FromServiceResult(result)); } return(NoContent()); }
public ActionResult Delete(int id) { var package = _actionService.GetSingleById(id); if (package == null) { return(HttpNotFound()); } _actionService.Delete(package); _actionService.Save(); return(Json(new { status = true }, JsonRequestBehavior.AllowGet)); }
public IActionResult Delete(int id) { var house = _houseService.GetById(id, User.Identity.GetId()); if (house != null) { var actions = _actionService.GetByHouseId(house.Id); if (actions.Count == 1) { _actionService.Delete(actions[0]); _houseService.Delete(house); return(View("DeleteSuccess")); } return(View("DeleteFail")); } return(NotFound()); }
public void Delete(int id) { _actionService.Delete(id); }
public async Task Delete(string actionId, string Token) { await _actionService.Delete(actionId, Token); }