Exemple #1
0
 /// <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);
         }
     }
 }
Exemple #2
0
 public RolesController(IWorkoutDAO db)
 {
     _db = db;
 }
Exemple #3
0
 public HistoryController(IWorkoutDAO db)
 {
     _db = db;
 }
 public WorkoutController(IWorkoutDAO db)
 {
     _db = db;
 }
 public ClassController(IWorkoutDAO db)
 {
     _db = db;
 }
Exemple #6
0
 /// <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;
 }