24 lines
709 B
C#
Raw Normal View History

2024-11-12 23:13:20 +04:00
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;
2024-12-08 13:24:07 +04:00
public BookType TypeBookID { get; set; } = BookType.None;
2024-11-12 23:13:20 +04:00
2024-12-08 13:24:07 +04:00
public static Book CreateEntity(int id, string author, string name, BookType typeBookID = BookType.None)
2024-11-12 23:13:20 +04:00
{
return new Book
{
Id = id,
Author = author ?? string.Empty,
Name = name ?? string.Empty,
2024-12-08 13:24:07 +04:00
TypeBookID = typeBookID
2024-11-12 23:13:20 +04:00
};
}
}
}