This commit is contained in:
21
Models/Book.cs
Normal file
21
Models/Book.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Example.Models
|
||||
{
|
||||
public class Book
|
||||
{
|
||||
public Book() {}
|
||||
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(200)]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(1000)]
|
||||
public string Summary { get; set; } = string.Empty;
|
||||
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime Published { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user