From 2c9c2cc3b414115bca9b6c63ca7b20d49a8a8ec1 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Thu, 15 Sep 2022 20:55:44 -0500 Subject: Agregar autor --- Models/Book.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'Models/Book.cs') diff --git a/Models/Book.cs b/Models/Book.cs index bcf9ef7..29faa97 100644 --- a/Models/Book.cs +++ b/Models/Book.cs @@ -1,15 +1,12 @@ -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 long AuthorId { get; set; } + public Author? Author { get; set; } public int PublicationYear { get; set; } - public string[] Genres { get; set; } + public string[]? Genres { get; set; } public int Edition { get; set; } - public string ISBN { get; set; } - public string Title { get; set; } + public string? ISBN { get; set; } + public string? Title { get; set; } } } \ No newline at end of file -- cgit v1.2.3