Exemple #1
0
        public TrainingWeekManager(ApplicationDbContext dbContext) : base(dbContext)
        {
            _trainingWeekModule = new TrainingWeekModule(DbContext);

            _trainingDaysService = WebAppConfiguration.ServiceProvider.GetService <ITrainingDaysService>();
            _userInfosService    = WebAppConfiguration.ServiceProvider.GetService <IUserInfosService>();
            ((BodyReportService)_trainingDaysService).SetDbContext(DbContext); // for use same transaction
        }
        public TrainingExerciseManager(ApplicationDbContext dbContext)
            : base(dbContext)
        {
            _trainingDayExerciseModule = new TrainingExerciseModule(DbContext);
            _trainingExerciseSetModule = new TrainingExerciseSetModule(DbContext);

            _userInfosService = WebAppConfiguration.ServiceProvider.GetService<IUserInfosService>();
            ((BodyReportService)_userInfosService).SetDbContext(DbContext); // for use same transaction
        }
 public TrainingDaysController(UserManager <ApplicationUser> userManager,
                               ITrainingDaysService trainingDaysService,
                               ITrainingWeeksService trainingWeeksService,
                               IUserInfosService userInfosService) : base(userManager)
 {
     _trainingDaysService  = trainingDaysService;
     _trainingWeeksService = trainingWeeksService;
     _userInfosService     = userInfosService;
 }
Exemple #4
0
 public UserController(IHostingEnvironment env, IEmailSender emailSender,
                       UserManager<ApplicationUser> userManager,
                       IUsersService usersService,
                       IUserInfosService userInfosService,
                       IRolesService rolesService) : base(userManager)
 {
     _env = env;
     _emailSender = emailSender;
     _usersService = usersService;
     _userInfosService = userInfosService;
     _rolesService = rolesService;
 }
 public UserController(IHostingEnvironment env, IEmailSender emailSender,
                       UserManager <ApplicationUser> userManager,
                       IUsersService usersService,
                       IUserInfosService userInfosService,
                       IRolesService rolesService,
                       IReportService reportService) : base(userManager)
 {
     _env              = env;
     _emailSender      = emailSender;
     _usersService     = usersService;
     _userInfosService = userInfosService;
     _rolesService     = rolesService;
     _reportService    = reportService;
 }
 public AccountController(UserManager<ApplicationUser> userManager,
                          ApplicationDbContext dbContext,
                          SignInManager<ApplicationUser> signInManager,
                          IUsersService usersService,
                          IUserInfosService userInfosService,
                          IEmailSender emailSender, 
                          ILoggerFactory loggerFactory) : base(userManager, dbContext)
 {
     _usersService = usersService;
     _userInfosService = userInfosService;
     _signInManager = signInManager;
     _emailSender = emailSender;
     _logger = loggerFactory.CreateLogger<AccountController>();
 }
Exemple #7
0
 public ProfileController(SignInManager <ApplicationUser> signInManager,
                          UserManager <ApplicationUser> userManager,
                          ApplicationDbContext dbContext,
                          IUsersService usersService, IUserInfosService userInfosService, ICitiesService citiesService,
                          ICountriesService countriesService,
                          IHostingEnvironment env) : base(userManager, dbContext)
 {
     _signInManager    = signInManager;
     _usersService     = usersService;
     _userInfosService = userInfosService;
     _citiesService    = citiesService;
     _countriesService = countriesService;
     _env = env;
 }
 public TrainingDayReportController(UserManager <ApplicationUser> userManager,
                                    IUsersService usersService,
                                    IUserInfosService userInfosService,
                                    ITrainingWeeksService trainingWeeksService,
                                    ITrainingDaysService trainingDaysService,
                                    ITrainingExercisesService trainingExercisesService,
                                    IBodyExercisesService bodyExercisesService) : base(userManager)
 {
     _usersService             = usersService;
     _userInfosService         = userInfosService;
     _trainingWeeksService     = trainingWeeksService;
     _trainingDaysService      = trainingDaysService;
     _trainingExercisesService = trainingExercisesService;
     _bodyExercisesService     = bodyExercisesService;
 }
 public ProfileController(SignInManager<ApplicationUser> signInManager,
     UserManager<ApplicationUser> userManager,
     ApplicationDbContext dbContext,
     IUsersService usersService, IUserInfosService userInfosService, ICitiesService citiesService,
     ICountriesService countriesService,
     IHostingEnvironment env)
     : base(userManager, dbContext)
 {
     _signInManager = signInManager;
     _usersService = usersService;
     _userInfosService = userInfosService;
     _citiesService = citiesService;
     _countriesService = countriesService;
     _env = env;
 }
Exemple #10
0
 public AccountController(UserManager <ApplicationUser> userManager,
                          ApplicationDbContext dbContext,
                          SignInManager <ApplicationUser> signInManager,
                          IUsersService usersService,
                          IUserInfosService userInfosService,
                          IReportService reportService,
                          IEmailSender emailSender,
                          ILoggerFactory loggerFactory) : base(userManager, dbContext)
 {
     _usersService     = usersService;
     _userInfosService = userInfosService;
     _reportService    = reportService;
     _signInManager    = signInManager;
     _emailSender      = emailSender;
     _logger           = loggerFactory.CreateLogger <AccountController>();
 }
 public TrainingDayReportController(UserManager<ApplicationUser> userManager,
                                    IUsersService usersService,
                                    IUserInfosService userInfosService,
                                    ITrainingWeeksService trainingWeeksService,
                                    ITrainingDaysService trainingDaysService,
                                    ITrainingExercisesService trainingExercisesService,
                                    IBodyExercisesService bodyExercisesService)
     : base(userManager)
 {
     _usersService = usersService;
     _userInfosService = userInfosService;
     _trainingWeeksService = trainingWeeksService;
     _trainingDaysService = trainingDaysService;
     _trainingExercisesService = trainingExercisesService;
     _bodyExercisesService = bodyExercisesService;
 }
Exemple #12
0
        public static TUnitType GetUserUnit(IUserInfosService userInfosService, string userId)
        {
            TUnitType result = TUnitType.Imperial;

            if (userId != null && userInfosService != null)
            {
                var userInfo = userInfosService.GetUserInfo(new UserInfoKey()
                {
                    UserId = userId
                });
                if (userInfo != null)
                {
                    result = userInfo.Unit;
                }
            }
            return(result);
        }
 public TrainingJournalController(UserManager<ApplicationUser> userManager,
                                  IUsersService usersService,
                                  IUserInfosService userInfosService,
                                  ITrainingWeeksService trainingWeeksService,
                                  ITrainingDaysService trainingDaysService,
                                  ITrainingExercisesService trainingExercisesService,
                                  IBodyExercisesService bodyExercisesService,
                                  IMusclesService musclesService,
                                  IMuscularGroupsService muscularGroupsService)
     : base(userManager)
 {
     _usersService = usersService;
     _userInfosService = userInfosService;
     _trainingWeeksService = trainingWeeksService;
     _trainingDaysService = trainingDaysService;
     _trainingExercisesService = trainingExercisesService;
     _bodyExercisesService = bodyExercisesService;
     _musclesService = musclesService;
     _muscularGroupsService = muscularGroupsService;
 }
Exemple #14
0
 public CoinCommands(IUserInfosService UserInfoService)
 {
     _UserInfoService = UserInfoService;
 }