コード例 #1
0
        public async Task <bool> CreateReportDataSource(ReportDataSourceInputDto input)
        {
            var entity = input.MapTo <ReportDataSource>();

            try
            {
                SetReportColumns(input);
            }
            catch (Exception ex)
            {
                throw new UserFriendlyException(ex.Message);
            }

            return(await _ReportDataSourceManager.CreateReportDataSourceAsync(entity));
        }
コード例 #2
0
        public async Task <bool> UpdateReportDataSource(ReportDataSourceInputDto input)
        {
            var entity = await _ReportDataSourceManager.GetReportDataSourceByIdAsync(input.Id);

            input.MapTo(entity);

            try
            {
                SetReportColumns(input);
            }
            catch (Exception ex)
            {
                throw new UserFriendlyException(ex.Message);
            }

            return(await _ReportDataSourceManager.UpdateReportDataSourceAsync(entity));
        }