Пример #1
0
        public async Task AddAsync(Category entity)
        {
            await runningBlogDbContext.Category.AddAsync(entity);

            await runningBlogDbContext.SaveChangesAsync();
        }
Пример #2
0
        public async Task AddAsync(Comment entity)
        {
            await runningBlogDbContext.Comment.AddAsync(entity);

            await runningBlogDbContext.SaveChangesAsync();
        }
Пример #3
0
        public async Task AddAsync(PostCategory entity)
        {
            await runningBlogDbContext.Set <PostCategory>().AddAsync(entity);

            await runningBlogDbContext.SaveChangesAsync();
        }