public Task <ActionResult <SessionViewModel> > CreateSessionAsync([FromBody] SessionInputModel inputModel) => Task.Run <ActionResult <SessionViewModel> >(() => { var session = (Session)inputModel; if (session == null) { return(BadRequest()); } _repository.AddSession(session); return(Ok((SessionViewModel)session)); });