public void PostSchedule([FromBody] List <EmployeeShiftVM> shifts) { // For more detail and better encapsulation (in a service see day 6 OnAuthorization()) //This is our check to determine whether or not our user is a manager or not var token = Request.Headers["Authorization"].ToString().Replace("Bearer ", ""); if (PatManagerVerify.CheckIfManager(token, context)) { ScheduleRepo sRepo = new ScheduleRepo(context); sRepo.AddScheduleItems(shifts); } }