Alexandria.Backend.Util.DtoExtensions.ToBookDtoArray C# (CSharp) Méthode

ToBookDtoArray() public static méthode

public static ToBookDtoArray ( this books ) : Alexandria.Messages.BookDTO[]
books this
Résultat Alexandria.Messages.BookDTO[]
        public static BookDTO[] ToBookDtoArray(this IEnumerable<Book> books)
        {
            return books.Select(book => new BookDTO
            {
                Id = book.Id,
                Image = book.Image,
                Name = book.Name,
                Author = book.Author
            }).ToArray();
        }
DtoExtensions