Kevin Matsubara b0e653ab0d Add one to one relationship between Coach and Team.
A Coach is parent, Team is child.
A Coach can exist on his own, without a Team, but a Team cannot play without a Coach.
2025-04-07 11:21:48 +02:00

9 lines
273 B
C#

namespace EntityFrameworkCore.Domain;
// Since C#11, you do not need to wrap in accolades anymore.
public class Coach : BaseDomainModel
{
public string Name { get; set; } // Strings are automatically become VARCHAR database types.
public Team? Team { get; set; }
}