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.
42 lines
803 B
42 lines
803 B
using System;
|
|
|
|
namespace ex_042_013_OneToOne_FluentAPI
|
|
{
|
|
/// <summary>
|
|
/// Nounours est une classe POCO, i.e. Plain Old CLR Object.
|
|
/// Elle a une relation 1-1 avec la classe CarnetDeSante via la propriété Carnet.
|
|
public class Nounours
|
|
{
|
|
public int UniqueId
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
public CarnetDeSante Carnet { get; set; }
|
|
|
|
public string Nom
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
public DateTime DateDeNaissance
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
public int NbPoils
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{UniqueId}: {Nom} ({DateDeNaissance:dd/MM/yyyy}, {NbPoils} poils)";
|
|
}
|
|
|
|
}
|
|
}
|