public async Task AddToCategoryAsync(CategoryBlogDto categoryBlogDto) { var control = await _categoryDal.GetAsync(I => I.BlogId == categoryBlogDto.BlogId && I.CategoryId == categoryBlogDto.CategoryId); if (control == null) { await _categoryDal.AddAsync(new CategoryBlog { BlogId = categoryBlogDto.BlogId, CategoryId = categoryBlogDto.CategoryId }); } }
public Task <AppUser> CheckUserAsync(AppUserLoginDto appUserLoginDto) { var appUser = _genericDal.GetAsync(p => p.UserName == appUserLoginDto.UserName && p.Password == appUserLoginDto.Password); if (appUser != null) { return(appUser); } else { return(null); } }
public async Task AddToCategoryAsync(CategoryBlogDto categoryBlogDto) { var addToCategory = await _categoryBlogDal.GetAsync(i => i.BlogId == categoryBlogDto.BlogId && i.CategoryId == categoryBlogDto.CategoryId); if (addToCategory == null) { await _categoryBlogDal.AddAsync(new CategoryBlog { BlogId = categoryBlogDto.BlogId, CategoryId = categoryBlogDto.CategoryId }); } }
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 AddToCategoryAsync(CategoryTopicDto categoryTopicDto) { var controlAddCategory = await _categoryTopicService.GetAsync (x => x.CategoryId == categoryTopicDto.CategoryId && x.TopicId == categoryTopicDto.TopicId); if (controlAddCategory == null) { await _categoryTopicService.AddAsync(new CategoryTopic { TopicId = categoryTopicDto.TopicId, CategoryId = categoryTopicDto.CategoryId }); } }
public async Task AddToCategoryAsync(CategoryBlogDto categoryBlogDto) { var control = await _categoryBlogService.GetAsync(p => p.CategoryId == categoryBlogDto.CategoryId && p.BlogId == categoryBlogDto.BlogId); if (control == null) { await _categoryBlogService.AddAsync( new CategoryBlog { BlogId = categoryBlogDto.BlogId, CategoryId = categoryBlogDto.CategoryId } ); } }
public async Task <TEntity> GetAsync(Expression <Func <TEntity, bool> > filter) { return(await _genericDal.GetAsync(filter)); }
public async Task <AppUser> CheckUserAsync(AppUserLoginDto appUserLoginDto) { return(await _genericDal.GetAsync(x => x.UserName == appUserLoginDto.UserName && x.Password == appUserLoginDto.Password)); }
public async Task <AppUser> CheckUserAsync(AppUserSignInDto appUserSignInDto) { return(await _genericDal.GetAsync(I => I.UserName == appUserSignInDto.UserName && I.Password == appUserSignInDto.Password)); }
public virtual Task <TEntity> GetAsync(Expression <Func <TEntity, bool> > expression) { return(_genericDal.GetAsync(expression)); }