mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-27 03:57:31 +00:00
Beginning React+Redux "Music Store" sample
This commit is contained in:
24
samples/react/MusicStore/Apis/Models/Genre.cs
Normal file
24
samples/react/MusicStore/Apis/Models/Genre.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace MusicStore.Models
|
||||
{
|
||||
public class Genre
|
||||
{
|
||||
public Genre()
|
||||
{
|
||||
Albums = new List<Album>();
|
||||
}
|
||||
|
||||
public int GenreId { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual ICollection<Album> Albums { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user