Exemplo n.º 1
0
        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
                });
            }
        }
Exemplo n.º 2
0
 public async Task <AppUser> CheckUserAsync(AppUserLoginDTO appUserLoginDTO)
 {
     return(await _genericDAL.GetAsync(x =>
                                       x.UserName == appUserLoginDTO.UserName &&
                                       x.Password == appUserLoginDTO.Password));
 }