public Author Get(Expression <Func <Author, bool> > filter)
 {
     try
     {
         return(_iAuthorDal.Get(filter));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Example #2
0
        public UiBlog GetById(int blogId)
        {
            Blog blog = _blogDal.Get(a => a.id == blogId);

            return(new UiBlog
            {
                title = blog.title,
                description = blog.description,
                content = blog.content,
                category = _categoryDal.Get(c => c.id == blog.categoryid).name,
                author = _authorDal.Get(a => a.id == blog.authorId).name
            });
        }
Example #3
0
        public UiAuthor GetAuthorByEmail(Author authors)
        {
            Author author = _authorDal.Get(a => a.email == authors.email);

            UiAuthor uiAuthor = new UiAuthor
            {
                name     = author.name,
                lastname = author.lastname,
                email    = author.email,
                tel      = author.tel
            };

            return(uiAuthor);
        }
Example #4
0
 public Author Get(Expression <Func <Author, bool> > filter)
 {
     return(_authorDal.Get(filter));
 }
Example #5
0
 public Author GetByMail(string email)
 {
     return(_authorDal.Get(a => a.Email == email));
 }
Example #6
0
 public Author GetById(int authorId)
 {
     return(_authorDal.Get(filter: x => x.AuthorId == authorId));
 }
Example #7
0
 public Author GetById(int id)
 {
     return(_authorDal.Get(a => a.Id == id));
 }
Example #8
0
 public Author ExitsAuthor(string authorName)
 {
     return(_authorDal.Get(a => a.Name == authorName));
 }
 public Author GetById(int id)
 {
     return(_authorDal.Get(p => p.AuthorId == id));
 }