コード例 #1
0
ファイル: SubmissionCommands.cs プロジェクト: nevergofull/A
        protected override async Task <CommandResponse <Domain.Models.Submission> > ProtectedExecute()
        {
            using (var db = new Repository())
            {
                var result = await db.PostSubmission(_userSubmission);

                return(CommandResponse.Map(result, result.Response.Map()));
            }
        }
コード例 #2
0
ファイル: CommentCommands.cs プロジェクト: nevergofull/A
        protected override async Task <CommandResponse <Domain.Models.Comment> > CacheExecute()
        {
            using (var db = new Repository())
            {
                var data = await db.PostComment(this.SubmissionID, this.ParentCommentID, this.Content);

                var mapped = CommandResponse.Map(data, data.Response.Map());
                return(data);
            }
        }