public override async Task Execute() { Result = await Session.Include <Attendance>(m => m.MeetingId).LoadAsync <Attendance>(Id); if (Result != null) { var meeting = await Session.LoadAsync <Meeting>(Result.MeetingId); ResultParticipants = await ResultProfileProjection .Transform(Session.Query <UserMaster, UserIndex>().Where(c => c.Id.In(meeting.Participants)) .OfType <IEntityProfile>()).ToListAsync(); } }
public override async Task Execute() { var query = Session.Query <UserMaster, UserIndex>() .Statistics(out QueryStatistics stats) .OrderByDescending(a => a.Name); if (Filter.AuthRestrict) { query = query.Where(u => u.CanAdmin); } query = await Init(query, Filter, "user"); Result = await ResultProfileProjection.Transform(query.OfType <User>()).ToListAsync(); Process(Filter, stats); }
public override async Task Execute() { Result = await Session.LoadAsync <Msg>(Id); if (Result != null) { ResultFiles = await VisibleDisplayProjection .Transform(Session.Query <VisibleFile, VisibleIndex>().Where(c => c.Id.In(Result.Files))) .ToListAsync(); ResultRecipients = await ResultProfileProjection .Transform(Session.Query <UserMaster, UserIndex>().Where(c => c.Id.In(Result.Recipients)) .OfType <IEntityProfile>()).ToListAsync(); if (!string.IsNullOrEmpty(Result.ReplyId)) { ResultReply = await MsgDisplayTrans .Transform(Session.Query <MsgMaster, MsgIndex>().Where(c => c.Id == Result.ReplyId)) .FirstOrDefaultAsync(); } } }