Exemplo n.º 1
0
        public override async Task <IEnumerable <Submission> > ExecuteAsync()
        {
            var data = await base.ExecuteAsync();

            DomainMaps.HydrateUserData(User, data);
            return(data);
        }
        public override async Task <IEnumerable <Domain.Models.Submission> > ExecuteAsync()
        {
            var result = await base.ExecuteAsync();

            DomainMaps.HydrateUserData(User, result);
            return(result);
        }
Exemplo n.º 3
0
        public override async Task <Submission> ExecuteAsync()
        {
            var submission = await base.ExecuteAsync();

            if (_hydrateUserData)
            {
                DomainMaps.HydrateUserData(User, submission);
            }
            return(submission);
        }
Exemplo n.º 4
0
        protected override async Task <Domain.Models.Comment> GetData()
        {
            using (var db = new Repository(User))
            {
                var result = await db.GetComments(_commentID);

                var comment = result.FirstOrDefault();
                DomainMaps.HydrateUserData(User, comment, true);
                return(comment);
            }
        }
Exemplo n.º 5
0
        public override async Task <IEnumerable <Message> > ExecuteAsync()
        {
            using (var repo = new Repository(User))
            {
                var result = await repo.GetMessages(_ownerName, _ownerType, _type, _state, _markAsRead, _options);

                //Hydrate user data
                var submissions = result.Where(x => x.Submission != null).Select(x => x.Submission);
                DomainMaps.HydrateUserData(User, submissions);

                var comments = result.Where(x => x.Comment != null).Select(x => x.Comment);
                DomainMaps.HydrateUserData(User, comments);

                return(result);
            }
        }