public CreateDashboardResponse Handle(CreateDashboardRequest request) { var response = new CreateDashboardResponse(); response.Errors = Validate(request); if (response.HasErrors) { return(response); } try { var dateNow = DateTime.Now; int dashId = _dashRepository.CreateAndGetId(new DashBoard { Name = request.DashName, DateModified = dateNow, DateCreated = dateNow, UserId = request.UserId }); response.Dashboard = _dashRepository.Get(dashId); } catch (Exception ex) { //response.Errors.Add(new ErrorStatus("BAD_REQUEST")); response.Errors.Add(new ErrorStatus(ex.Message)); } return(response); }