Пример #1
0
        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;
        }
Пример #2
0
        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);
        }