コード例 #1
0
        public async Task <IdentityResult> CreateAsync(User user, CancellationToken cancellationToken)
        {
            db.Add(user);

            await db.SaveChangesAsync(cancellationToken);

            return(await Task.FromResult(IdentityResult.Success));
        }
コード例 #2
0
        public async Task <bool> CreateUserPlaylist(UserPlaylist playlist)
        {
            context.Add(playlist);

            await context.SaveChangesAsync();

            return(await Task.FromResult(true));

            //await conte
            //throw new NotImplementedException();
        }
コード例 #3
0
        public async Task <bool> CreateArtistPicAsync(ArtistPicture artistPic)
        {
            context.Add(artistPic);

            await context.SaveChangesAsync();

            return(await Task.FromResult(true));
        }