コード例 #1
0
        public async Task <sr <int> > Save(SlideDeck slideDeck)
        {
            // TODO: add user to set author
            slideDeck.AuthorId = 1;

            return(await _base.Post <SlideDeck, int>("api/slideDeck", slideDeck));
        }
コード例 #2
0
        public async Task <sr <UserAvatar> > Save(UserAvatar userAvatar)
        {
            var response = await _base.Post <UserAvatar, int>("api/userAvatar", userAvatar);

            if (response.Success)
            {
                userAvatar.Id = response.Data;
                return(sr <UserAvatar> .GetSuccess(userAvatar));
            }
            return(sr <UserAvatar> .Get(response.Message));
        }
コード例 #3
0
ファイル: BlogService.cs プロジェクト: land297/LearningBlazor
        public async Task <sr <int> > Save(BlogPost slideDeck)
        {
            // TODO: add user to set author
            slideDeck.AuthorId = 1;

            return(await _base.Post <BlogPost, int>("api/blog", slideDeck));
        }
コード例 #4
0
 public async Task <sr <UserAccessSlideDeckProgram> > PostToUserAvatar(UserAccessSlideDeckProgram ua)
 {
     return(await _base.Post <UserAccessSlideDeckProgram, UserAccessSlideDeckProgram>($"api/UserAccessSlideDeckProgram", ua));
 }
コード例 #5
0
 public async Task <sr <int> > Save(SlideDeckProgram slideDeckProgram)
 {
     // TODO: add user to set author
     slideDeckProgram.AuthorId = 1;
     return(await _base.Post <SlideDeckProgram, int>("api/slideDeckProgram", slideDeckProgram));
 }
コード例 #6
0
 public async Task <sr <CompletedSlideDeckProgram> > Save(CompletedSlideDeckProgram completedProgram)
 {
     return(await _base.Post <CompletedSlideDeckProgram, CompletedSlideDeckProgram>("api/CompletedSlideDeckProgram", completedProgram));
 }