ProjectLib/ProjectLibrary/Entites/Orders.cs

37 lines
954 B
C#
Raw Normal View History

using Microsoft.VisualBasic;
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 Orders
{
public int Id { get; private set; }
public DateTime OrderDate { get; private set; }
public DateTime ReturnDate { get; private set; }
2024-11-12 23:13:20 +04:00
public int ReaderID { get; private set; }
public IEnumerable<Book_Orders> BookOrders
{
get;
private set;
} = [];
public static Orders CreateEntity(int id, DateTime orderDate, DateTime returnDate, int readerID, IEnumerable<Book_Orders> bookOrders)
2024-11-12 23:13:20 +04:00
{
return new Orders
{
Id = id,
OrderDate = orderDate,
ReturnDate = returnDate,
ReaderID = readerID,
BookOrders = bookOrders
2024-11-12 23:13:20 +04:00
};
}
}
}