예제 #1
0
        private WorkoutTypeService CreateWorkoutTypeService()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new WorkoutTypeService(userId);

            return(service);
        }
예제 #2
0
        // GET: WorkoutType
        public ActionResult Index()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new WorkoutTypeService(userId);
            var model   = service.GetWorkoutTypes();

            return(View(model));
        }
예제 #3
0
 public WorkoutTypeController(FitnessCenterDbContext context, IMapper mapper)
 {
     _context            = context;
     _mapper             = mapper;
     _workoutTypeService = new WorkoutTypeService(_context, _mapper);
 }