private WorkoutTypeService CreateWorkoutTypeService() { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new WorkoutTypeService(userId); return(service); }
// GET: WorkoutType public ActionResult Index() { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new WorkoutTypeService(userId); var model = service.GetWorkoutTypes(); return(View(model)); }
public WorkoutTypeController(FitnessCenterDbContext context, IMapper mapper) { _context = context; _mapper = mapper; _workoutTypeService = new WorkoutTypeService(_context, _mapper); }