Skip to content

Instantly share code, notes, and snippets.

@emrekizildas
Created March 19, 2019 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emrekizildas/88715a984dc4912a0572417ad6ae3748 to your computer and use it in GitHub Desktop.
Save emrekizildas/88715a984dc4912a0572417ad6ae3748 to your computer and use it in GitHub Desktop.
Book Sınıfı
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