Created
March 19, 2019 08:49
-
-
Save emrekizildas/88715a984dc4912a0572417ad6ae3748 to your computer and use it in GitHub Desktop.
Book Sınıfı
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel.DataAnnotations; | |
using System.ComponentModel.DataAnnotations.Schema; | |
namespace CoreAPI.Models | |
{ | |
public class Book | |
{ | |
[Key] | |
public int BookID { get; set; } | |
[MaxLength(50)] | |
public string Name { get; set; } | |
[ForeignKey("Author")] | |
public int AuthorID { get; set; } | |
public virtual Author Author { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment