Exemplo n.º 1
0
        //Hämtar en specifik författare
        static public Author getAuthor(int id)
        {
            AUTHOR aauthor   = _eAuthorObj.Read(id);
            Author authorObj = Mapper.Map <Author>(aauthor);

            authorObj.FirstName = authorObj.FirstName;
            authorObj.LastName  = authorObj.LastName;
            authorObj.BirthYear = authorObj.BirthYear;
            authorObj.BooksList = Mapper.Map <List <BOOK>, List <Book> >(aauthor.BOOKs.ToList());
            return(authorObj);
        }
Exemplo n.º 2
0
 static public Author getAuthor(int AID)
 {
     return(Mapper.Map <Author>(e_aID.Read(AID)));
 }