public ActionModel FindByID(int ID) { ActionRepository _repo = new ActionRepository(); List <ActionModel> theActions = _repo.Actions(null, ID); this.ID = theActions[0].ID; this.Name = theActions[0].Name; this.Description = theActions[0].Description; return(this); }
public List <ActionModel> ActionsAll() { ActionRepository _repo = new ActionRepository(); return(_repo.Actions()); }
/*public RoleModel() * { * this.User = new UserModel(); * this.User.FindByID(UserModel.CurrentUserId); * }*/ public List <ActionModel> Actions() { ActionRepository _repo = new ActionRepository(); return(_repo.Actions(Convert.ToInt32(this.ID))); }
public void Delete() { ActionRepository _repo = new ActionRepository(); _repo.Delete(this); }
public void Create() { ActionRepository _repo = new ActionRepository(); _repo.Create(this); }
public List <ActionModel> UserActions(int UserId) { ActionRepository _repo = new ActionRepository(); return(_repo.ActionsUser(UserId)); }