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