public ServiceResponse <HeadstoneUserRole> Delete(Expression <Func <HeadstoneUserRole, bool> > predicate) { using (var bo = new UserRoleDAO()) { var model = bo.Find(predicate); bool isDeleted = bo.Delete(model as HeadstoneUserRole, true); if (isDeleted) { return(new ServiceResponse <HeadstoneUserRole>() { Type = ServiceResponseTypes.Success, Source = ServiceResponseSources.MsSQL, Result = new List <HeadstoneUserRole>() { model } }); } else { return(new ServiceResponse <HeadstoneUserRole>() { Type = ServiceResponseTypes.Error, Source = ServiceResponseSources.MsSQL, Result = new List <HeadstoneUserRole>() { model } }); } } }
public ServiceResponse <HeadstoneUserRole> Delete(HeadstoneUserRole model) { using (var bo = new UserRoleDAO()) { bool isDeleted = bo.Delete(model as HeadstoneUserRole, true); if (isDeleted) { return(new ServiceResponse <HeadstoneUserRole>() { Type = ServiceResponseTypes.Success, Source = ServiceResponseSources.MsSQL, Result = new List <HeadstoneUserRole>() { model } }); } else { return(new ServiceResponse <HeadstoneUserRole>() { Type = ServiceResponseTypes.Error, Source = ServiceResponseSources.MsSQL, Result = new List <HeadstoneUserRole>() { model } }); } } }
public ActionResult Delete(string id, FormCollection collection) { try { userRoleDAO.Delete(id); return(RedirectToAction("Index")); } catch { return(View("Error")); } }
public ActionResult Delete(string id, FormCollection collection) { try { userRoleDAO.Delete(id); //brisanje iz Identity-ja clientDAO.Delete(id); //brisanje iz baze return(RedirectToAction("Index")); } catch { return(View("Error")); } }
public JsonResult Delete(int id) { var lst = roledao.Delete(id); return(Json(lst, JsonRequestBehavior.AllowGet)); }
public override bool Delete(object dto) { return(dao.Delete(dto)); }
public int Delete(int userId, RoleType roleId) { return(_userroledao.Delete(userId, roleId)); }