public ActionResult DeleteConfirmed(long id) { LanguagesPost languages = _languagesService.GetPost(id); languages.UserName = User.Identity.Name; _languagesService.Delete(languages); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { languagesService.Delete(id); SetViewBagsAndHeaders(Request.IsAjaxRequest(), "All added languages", "Language is deleted successfully."); if (Request.IsAjaxRequest()) { return(PartialView("Index", languagesService.GetByActiveProject(UserActiveProject).ProjectTo <LanguagesViewModels>())); } return(View("Index", languagesService.GetByActiveProject(UserActiveProject).ProjectTo <LanguagesViewModels>())); }
public async Task <IActionResult> Delete(int id) { try { var language = await languagesService.Delete(id); return(Ok(new { message = "deleted" })); } catch (Exception e) { throw new Exception(e.Message); } }
public void Delete(Languages obj) { _service.Delete(obj); }
public ServiceResponse <LanguagesDto> Delete(byte languagesId) { return(_service.Delete(languagesId)); }