/// <summary> /// Constructor for the role manager. Create this everytime a user changes. /// </summary> /// <param name="user">The user to get the permissions for</param> public RoleManager(IWorkoutDAO db) { if (_roles.Count == 0) { var roles = db.GetRoleItems(); foreach (var role in roles) { _roles.Add(role.Id, role); } } }
public RolesController(IWorkoutDAO db) { _db = db; }
public HistoryController(IWorkoutDAO db) { _db = db; }
public WorkoutController(IWorkoutDAO db) { _db = db; }
public ClassController(IWorkoutDAO db) { _db = db; }
/// <summary> /// Creates a new account controller. /// </summary> /// <param name="tokenGenerator">A token generator used when creating auth tokens.</param> /// <param name="db">Access to the BuddyBux database.</param> public AccountController(ITokenGenerator tokenGenerator, IWorkoutDAO db) { _tokenGenerator = tokenGenerator; _db = db; }