You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.3 KiB
48 lines
1.3 KiB
// ========================================================================
|
|
//
|
|
// Copyright (C) 2016-2017 MARC CHEVALDONNE
|
|
// marc.chevaldonne.free.fr
|
|
//
|
|
// Module : Album.cs
|
|
// Author : Marc Chevaldonné
|
|
// Creation date : 2016-10-19
|
|
//
|
|
// ========================================================================
|
|
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace ex_042_008_EF_CF_One_to_Many
|
|
{
|
|
/// <summary>
|
|
/// Album est une classe POCO, i.e. Plain Old CLR Object.
|
|
/// Elle a une relation 1-many avec la classe Morceau via la propriété Morceaux.
|
|
/// La clé primaire est générée lors de l'insertion en table.
|
|
/// </summary>
|
|
[Table("Albums")]
|
|
public class Album
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public Guid UniqueId
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
public string Titre
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
public DateTime DateDeSortie
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
public virtual ICollection<Morceau> Morceaux { get; set; } = new List<Morceau>();
|
|
}
|
|
}
|