public override void FillObject(ReportModel target, LP_Report source) { target.ID = source.ID; target.Name = source.Name; target.Type = source.Type; target.Language = source.Language; target.XLabelAngle = source.XLabelAngle; target.CategoryID = source.CategoryID; target.Public = source.Public; target.Description = source.Description; target.Interpretation = source.Interpretation; target.InformationSource = source.InformationSource; var query = (from n in source.ReportLogics where n.DateDeleted == null && n.Logic != null select n); var converter = new ReportLogicEntityModelConverter(DbContext); var models = query.Select(n => converter.Convert(n)); target.ReportLogics = new ReportLogicsModel { List = models.ToList() }; }
public override void FillObject(ReportUnitModel target, LP_Report source) { target.ID = source.ID; target.Name = source.Name; target.Type = source.Type; target.XLabelAngle = source.XLabelAngle; target.CategoryID = source.CategoryID; target.Description = source.Description; target.Interpretation = source.Interpretation; target.InformationSource = source.InformationSource; var logics = (from n in source.ReportLogics where n.DateDeleted == null && n.Logic != null select n); var models = logics.Select(n => reportLogicConverter.Convert(n)); target.ReportLogics = new ReportLogicsModel { List = models.ToList() }; }