summaryrefslogtreecommitdiff
path: root/Models
diff options
context:
space:
mode:
Diffstat (limited to 'Models')
-rw-r--r--Models/Book.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Models/Book.cs b/Models/Book.cs
index 998a3ee..d648c12 100644
--- a/Models/Book.cs
+++ b/Models/Book.cs
@@ -1,5 +1,10 @@
+using System.ComponentModel.DataAnnotations.Schema;
+using System.ComponentModel.DataAnnotations;
+
namespace LibraryAPI.Models {
public class Book {
+ [Key]
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public DateTime PublicationDate { get; set; }