//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); }
static public Author getAuthor(int AID) { return(Mapper.Map <Author>(e_aID.Read(AID))); }