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.
46 lines
932 B
46 lines
932 B
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace ex_042_009_DataSeeding
|
|
{
|
|
[Table("TableNounours")]
|
|
public class Nounours
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public Guid UniqueId
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
[Required]
|
|
[MaxLength(256)]
|
|
//[Column("name", Order=0, TypeName ="varchar(200)")]
|
|
public string Nom
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[Column("Naissance", TypeName = "date")]
|
|
public DateTime DateDeNaissance
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
public int NbPoils
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{UniqueId}: {Nom} ({DateDeNaissance:dd/MM/yyyy}, {NbPoils} poils)";
|
|
}
|
|
|
|
}
|
|
}
|