public async Task AddToCategoryAsync(CategoryBlogDTO categoryBlogDTO) { var categoryBlog = await _categoryBlogDAL.GetAsync(x => x.BlogId == categoryBlogDTO.BlogId && x.CategoryId == categoryBlogDTO.CategoryId); if (categoryBlog == null) { await _categoryBlogDAL.AddAsync( new CategoryBlog { BlogId = categoryBlogDTO.BlogId, CategoryId = categoryBlogDTO.CategoryId }); } }
public async Task AddAsync(TEntity entity) { await _genericDal.AddAsync(entity); }