private async Task AddExercise(string exerciseName, IExerciseRepository repo, DataContext context) { var exercise = Exercise.Create(exerciseName, await GetUser(context)); repo.Add(exercise); await repo.SaveAll(); }
public ExerciseController(IExerciseFactory factory, IWorkoutFactory workoutFactory, IExerciseRepository repository, IWorkoutRepository workoutRepository) { this.repository = repository; this.workoutRepository = workoutRepository; this.exerciseFactory = factory; this.workoutFactory = workoutFactory; }
public void SetUp() { _exerciseRepository = new ExerciseRepository(); dataHelper = new IntegrationTestData(); dataHelper.SetUp(); }
public ExerciseController(IGroupOfMusclesRepository groupOfMusclesRepository, IExerciseRepository repository, IMusclesRepository musclesRepository) { _groupOfMusclesRepository = groupOfMusclesRepository; _repository = repository; _muscleRepository = musclesRepository; }
public SetService(IExerciseRepository exerciseRepository, IRoutineRepository routineRepository, IUserService userService, ISetRepository setRepository) { _exerciseRepository = exerciseRepository; _routineRepository = routineRepository; _userService = userService; _setRepository = setRepository; }
public UnitOfWork(ExerciseMsDbContext dbContext, IUserService userService) { _dbContext = dbContext; _userService = userService; Exercises = new ExerciseRepository(_dbContext, _userService); }
public AssignExerciseToWorkoutCommandHandler(IExerciseSetRepository exerciseSetRepository, IExerciseRepository exerciseRepository, IUserRepository userRepository, IWorkoutRepository workoutRepository) { _exerciseSetRepository = exerciseSetRepository; _exerciseRepository = exerciseRepository; _userRepository = userRepository; _workoutRepository = workoutRepository; }
public ExercisesViewModel(CustomIdentityContext identityContext, IExerciseRepository exerciseRepository, IWorkoutRepository workoutRepository, IMuscleGroupRepository muscleGroupRepository) { _identityContext = identityContext; _exerciseRepository = exerciseRepository; _workoutRepository = workoutRepository; _muscleGroupRepository = muscleGroupRepository; }
public ExerciseService( IExerciseRepository exerciseRepository, IMapper mapper) { _mapper = mapper; _exerciseRepository = exerciseRepository; }
public ExerciseSessionController(IExerciseSessionRepository exerciseSessionRepository, IExerciseRepository exerciseRepository, IUserRepository userRepository) : base(userRepository) { _exerciseSessionRepository = exerciseSessionRepository; _exerciseRepository = exerciseRepository; }
public MainController(IWindowFormsFactory inFormFactory, IExerciseRepository exerciseRepository, IWorkoutRepository workoutRepository, IWeightMeasureRepository weightMeasureRepository) { _formsFactory = inFormFactory; _exerciseRepository = exerciseRepository; _workoutRepository = workoutRepository; _weightMeasureRepository = weightMeasureRepository; }
public ExerciseService(ILoggerFactory logger, IMapper mapper, IExerciseRepository exerciseRepository) { Logger = logger.CreateLogger <ExerciseService>(); _mapper = mapper; _exerciseRepository = exerciseRepository; PopulateDatabase(); //Todo remove }
public ExerciseController(IBodyAreaRepository bAreaRepo, IBodyPartRepository bPartRepo, IMuscleRepository muscleRepo, IExerciseRepository exerciseRepo) { bodyAreaRepository = bAreaRepo; bodyPartRepository = bPartRepo; muscleRepository = muscleRepo; exerciseRepository = exerciseRepo; dbGetter.AssignData(muscleRepository.Muscles.ToList(), bodyAreaRepository.BodyAreas.ToList(), bodyPartRepository.BodyParts.ToList()); }
public AdminExercisesController(IExerciseRepository repository, IHostingEnvironment hostingEvironment, IMusclesRepository muscleRepository, IGroupOfMusclesRepository groupOfMusclesRepository) { _repository = repository; _hostingEnvironment = hostingEvironment; _muscleRepository = muscleRepository; _groupOfMusclesRepository = groupOfMusclesRepository; }
public ExerciseService(IExerciseRepository exerciseRepository, IExerciseTypeRepository exerciseTypeRepository, IMapper mapper) { _exerciseRepo = exerciseRepository; _exerciseTypeRepo = exerciseTypeRepository; _mapper = mapper; }
public ExerciseController(IAssignmentService assignmentService, IExerciseRepository exerciseRepository, IExerciseConverter exerciseConverter) { _assignmentService = assignmentService; _exerciseRepository = exerciseRepository; _exerciseConverter = exerciseConverter; }
public ExerciseServiceTests() { _fixture = new Fixture(); _exerciseRepository = Substitute.For <IExerciseRepository>(); _mapper = Substitute.For <IMapper>(); _mapper = AutoMapperConfig.Initialize(); _sut = new ExerciseService(_exerciseRepository, _mapper); }
public WorkoutExerciseController(IExerciseRepository exerciseRepository, IWorkoutRepository workoutRepository, IUserRepository userRepository, IWorkoutExerciseRepository workoutExerciseRepository) { _exerciseRepository = exerciseRepository; _workoutRepository = workoutRepository; _userRepository = userRepository; _workoutExerciseRepository = workoutExerciseRepository; }
public void ShowExercises(IMainController mainController, List <Exercise> exercises, IExerciseRepository exerciseRepository) { _mainController = mainController; _exercises = exercises; _exerciseRepository = exerciseRepository; UpdateList(); this.Show(); }
public RoutineService(IRoutineRepository routineRepository, IExerciseRepository exerciseRepository, IMapper mapper, ILogger <RoutineService> logger) { _routineRepository = routineRepository; _exerciseRepository = exerciseRepository; _mapper = mapper; _logger = logger; }
public FitFileWorkoutsModel(IExerciseRepository exerciseRepository, IWorkoutRepository workoutRepository, CustomIdentityContext identityContext, ILogger <HomeController> logger) { _identityContext = identityContext; _workoutRepository = workoutRepository; _exerciseRepository = exerciseRepository; _logger = logger; WorkoutsOnSelectedDateForUser = null; }
public TournamentController(ITournamentRepository tournamentRepository, ITournamentsUsersRepository tournamentsUsersRepository, IExerciseRepository exerciseRepository) { _tournamentRepository = tournamentRepository; _tournamentsUsersRepository = tournamentsUsersRepository; _exerciseRepository = exerciseRepository; }
public void ShowAddTraining(IFormFactory formFactory, IExerciseRepository exerciseRepository, IMainController mainController) { IAddTrainingForm form = formFactory.CreateAddTrainingForm(); List <Exercise> exercises = exerciseRepository.GetAllExercises(); form.ShowModal(mainController, exercises); }
public ExerciseService( IExerciseFactory factory, IExerciseFinisher finisher, IExerciseRepository repository) { _factory = factory ?? throw new ArgumentNullException(nameof(factory)); _finisher = finisher ?? throw new ArgumentNullException(nameof(finisher)); _repository = repository ?? throw new ArgumentNullException(nameof(repository)); }
public void Init() { categoryRepository = new MockCategoryRepository(); exerciseRepository = new MockExerciseRepository(); setRepository = new MockSetRepository(); completedSetRepository = new MockCompletedSetRepository(); fitDataService = new FitDataService(categoryRepository, exerciseRepository, setRepository, completedSetRepository); }
public ExerciseService( IQuestionService QuestionService, IExerciseRepository ExerciseRepository, IDataSourceService DataSourceService) { _questionService = QuestionService; _exerciseRepository = ExerciseRepository; _dataSourceService = DataSourceService; }
public HomeController() { this.exRepository = new ExerciseRepository <Exercise>(); if (flag == 0) { SampleDataLoad(); flag = 1; } }
public UnitOfWork(IDbConnection connection, IExerciseRepository exerciseRepository, IPracticeRoutineRepository practiceRoutineRepository) { this.connection = connection ?? throw new ArgumentNullException("A closed IDbConnection must be provided."); Exercises = exerciseRepository ?? throw new ArgumentNullException("ExerciseRepository must be specified."); PracticeRoutines = practiceRoutineRepository ?? throw new ArgumentNullException("PracticeRoutineRepository must be specified."); connection.Open(); transaction = connection.BeginTransaction(); }
public TournamentService(ITournamentRepository tournamentRepository, ITournamentsUsersRepository tournamentsUsersRepository, IExerciseRepository exerciseRepository, IMapper mapper) { _tournamentRepository = tournamentRepository; _tournamentsUsersRepository = tournamentsUsersRepository; _exerciseRepository = exerciseRepository; _mapper = mapper; }
public UserController(UserManager <IdentityUser <int> > userManager, SignInManager <IdentityUser <int> > signInManager, AppDBContext db, ITrainingRepository tr, IExerciseRepository er, IUserRepository ur) { this.userManager = userManager; this.signInManager = signInManager; this.db = db; this.tr = tr; this.er = er; this.ur = ur; }
public AthleteExerciseServiceTests() { _fixture = new Fixture(); _fixture.Behaviors.OfType <ThrowingRecursionBehavior>().ToList() .ForEach(b => _fixture.Behaviors.Remove(b)); _fixture.Behaviors.Add(new OmitOnRecursionBehavior()); _athleteRepository = Substitute.For <IAthleteRepository>(); _exerciseRepository = Substitute.For <IExerciseRepository>(); _sut = new AthleteExerciseService(_athleteRepository, _exerciseRepository); }
public FitDataService(ICategoryRepository categoryRepository, IExerciseRepository exerciseRepository, ISetRepository setRepository, ICompletedSetRepository completedSetRepository) { this.categoryRepository = categoryRepository; this.exerciseRepository = exerciseRepository; this.setRepository = setRepository; this.completedSetRepository = completedSetRepository; }
public IList<Entities.Event> RetrieveExercises(IExerciseRepository repository) { //retrieve from cache IList<Event> exercises = ExerciseClient.RetrieveExercises(); if (exercises == null) { //retrieve from database exercises = repository.RetrieveExercises(); //save to cache ExerciseClient.SaveExercises(exercises); } return exercises; }
public ExerciseBusiness(IExerciseRepository exerciseRepository) { _exerciseRepository = exerciseRepository; }
public ExerciseService(IExerciseRepository exerciseRepository) { _exerciseRepository = exerciseRepository; }
public void SetUp() { _setRepository = new SetRepository(); _logRepository = new LogRepository(); _personRepository = new PersonRepository(); _exerciseRepository = new ExerciseRepository(); dataHelper = new IntegrationTestData(); dataHelper.SetUp(); }