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)); }
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)); }