public IActionResult CreateReportElement(int dashboardId)
        {
            CreateReportElementViewModel model = new CreateReportElementViewModel
            {
                DashboardId = dashboardId
            };

            return(View(model));
        }
        public async Task <IActionResult> CreateReportElement(CreateReportElementViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            string           userId        = _userManager.GetUserId(User);
            ReportElementDto reportElement = _mapper.Map <CreateReportElementViewModel, ReportElementDto>(model);
            await _reportElementManager.CreateReportElement(reportElement, userId);

            return(RedirectToAction("Detail", "Dashboard", new { id = model.DashboardId }));
        }