public async Task AddToCategoryAsync(CategoryBlogDto categoryBlogDto) { var control = await _categoryBlogDal.GetAsync(x => x.CategoryId == categoryBlogDto.CategoryId && x.BlogId == categoryBlogDto.BlogId); if (control == null) { await _categoryBlogDal.InsertAsync(new CategoryBlog { BlogId = categoryBlogDto.BlogId, CategoryId = categoryBlogDto.CategoryId }); } }
public async Task InsertAsync(T entity) { await _genericDal.InsertAsync(entity); }