public IActionResult CreateASession(Sessions sessionToStart) { var createdSession = _repository.CreateASession(sessionToStart); if (createdSession == null) { return(NotFound("There was an error creating your session")); } else { return(Created("", createdSession)); } }