public ReportParameters Materialize(DiscCtx ctx) { var res = new ReportParameters { Discussion = ctx.Discussion.FirstOrDefault(d0 => d0.Id == DiscussionId), Topic = ctx.Topic.FirstOrDefault(t0 => t0.Id == TopicId), Session = ctx.Session.FirstOrDefault(s0 => s0.Id == SessionId) }; if (res.Discussion == null || res.Topic == null || res.Session==null) return null; return res; }
public ReportParameters Materialize(DiscCtx ctx) { var res = new ReportParameters { Discussion = ctx.Discussion.FirstOrDefault(d0 => d0.Id == DiscussionId), Topic = ctx.Topic.FirstOrDefault(t0 => t0.Id == TopicId), Session = ctx.Session.FirstOrDefault(s0 => s0.Id == SessionId) }; if (res.Discussion == null || res.Topic == null || res.Session == null) { return(null); } return(res); }