29 lines
737 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BookDatabaseImplement.Model
{
public class Book
{
public int Id { get; set; }
[Required]
public string Title { get; set; } = string.Empty;
[Required]
public string BookType { get; set; } = string.Empty;
[Required]
[StringLength(200, MinimumLength = 100)]
public string Annotation { get; set; } = string.Empty;
[InverseProperty("Book")]
public List<History> LastReaders { get; set; } = new List<History>();
}
}