示例#1
0
        public void ReportDtoMapper_Test()
        {
            var report = new Report("ReportNameTest", "ReportDisplayNameTest", "ReportDescTest", Guid.NewGuid(),  "dbo", "gang.yang");
            var reportDto = AutoMapperAdapter.Adapt<ReportDto>(report);

            Assert.IsTrue(reportDto.Schema == "dbo");
        }
示例#2
0
        public ReportDto CreateReport(ReportDto reportDto)
        {
            var report = new Report(reportDto.ReportName, reportDto.DisplayName, reportDto.Description,
                reportDto.RdbmsId, reportDto.Schema, reportDto.CreatedBy);
            this._reportRepository.Add(report);

            return report.MapAs<ReportDto>();
        }