30 lines
788 B
C#
30 lines
788 B
C#
using Microsoft.VisualBasic.FileIO;
|
|
using ProjectHorseRacingOrg.Entities.Enums;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ProjectHorseRacingOrg.Entities;
|
|
|
|
public class Race
|
|
{
|
|
public int Id { get; private set; }
|
|
public RaceType RaceType { get; private set; }
|
|
public string Name { get; private set; } = string.Empty;
|
|
public string Description { get; private set; } = string.Empty;
|
|
public static Race CreateEntity(int id, RaceType raceType, string name,
|
|
string description)
|
|
{
|
|
return new Race
|
|
{
|
|
Id = id,
|
|
RaceType = raceType,
|
|
Name = name ?? string.Empty,
|
|
Description = description ?? string.Empty
|
|
};
|
|
}
|
|
|
|
}
|