Exemplo n.º 1
0
        public static LibraryEntity.AuthorLibrary ToAuthorEntity(BusinessLayer.AuthorLibrary bussinessAuthor)
        {
            var databaseAuthor = new LibraryEntity.AuthorLibrary()
            {
                id          = bussinessAuthor.id,
                Name        = bussinessAuthor.Name,
                Gender      = bussinessAuthor.Gender,
                YearOfBirth = bussinessAuthor.YearOfBirth,
                BookID      = ToBookEntity(bussinessAuthor.BookLibrary).UniqueID
            };

            return(databaseAuthor);
        }
Exemplo n.º 2
0
        public static BusinessLayer.AuthorLibrary ToBussinessAuthor(LibraryEntity.AuthorLibrary databaseAuthor)
        {
            var bussinessAuthor = new BusinessLayer.AuthorLibrary()
            {
                id          = databaseAuthor.id,
                Name        = databaseAuthor.Name,
                Gender      = databaseAuthor.Gender,
                YearOfBirth = databaseAuthor.YearOfBirth,
                BookLibrary = ToBusinessBook(databaseAuthor.BookLibrary)
            };

            return(bussinessAuthor);
        }