-
Notifications
You must be signed in to change notification settings - Fork 0
/
Anime.cs
37 lines (30 loc) · 944 Bytes
/
Anime.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace MyAnime_updatedDB.Models
{
public class Anime
{
public int ID { get; set; }
[Required]
[DisplayName("Anime Name")]
public string AnimeName { get; set; }
[Required]
[ForeignKey("Genre")]
public int GenreId { get; set; }
public string Description { get; set; }
[DisplayName("Aired in")]
[Range(1940, 2017)]
public int Year { get; set; }
[Range(1, 2000)]
public int Episodes { get; set; }
public bool Finished { get; set; }
public string Image { get; set; }
public virtual Genre Genre { get; set; }
}
}