public async Task AddCategoryToBlog(BlogCategoryDto blogCategoryDto) { var categoryToAddToBlog = await blogCategoryDal.GetByFilter(I => I.CategoryId == blogCategoryDto.CategoryId && I.BlogId == blogCategoryDto.BlogId); if (categoryToAddToBlog == null) { await blogCategoryDal.Create(new BlogCategory { BlogId = blogCategoryDto.BlogId, CategoryId = blogCategoryDto.CategoryId }); } }
public void Create(T entity) { _genericDal.Create(entity); }
public async Task Create(T entity) { await genericDal.Create(entity); }