namespace ProjectLibrary.Entities { using ProjectLibrary.Entities.Enums; public class Book { public int Id { get; private set; } public string Author { get; private set; } = string.Empty; public string Name { get; private set; } = string.Empty; public BookType Type { get; set; } = BookType.None; public int LibraryID { get; private set; } public static Book CreateEntity(int id, string author, string name, int libraryID, BookType type = BookType.None) { return new Book { Id = id, Author = author ?? string.Empty, Name = name ?? string.Empty, LibraryID = libraryID, Type = type }; } } }