ProjectLib/ProjectLibrary/Entites/Library.cs

33 lines
883 B
C#
Raw Normal View History

using ProjectLibrary.Forms;
using System;
2024-11-12 23:13:20 +04:00
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectLibrary.Entites
{
public class Library
{
public int Id { get; private set; }
public string Name { get; private set; } = string.Empty;
public string Address { get; private set; } = string.Empty;
public IEnumerable<Book_Library> BookLibrary
{
get;
private set;
} = [];
2024-11-12 23:13:20 +04:00
public static Library CreateEntity(int id, string name, string address, IEnumerable<Book_Library> bookLibrary)
2024-11-12 23:13:20 +04:00
{
return new Library
{
Id = id,
Name = name ?? string.Empty,
Address = address ?? string.Empty,
BookLibrary = bookLibrary
2024-11-12 23:13:20 +04:00
};
}
}
}