29 lines
815 B
C#
29 lines
815 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ProjectHorseRacingOrg.Entities;
|
|
|
|
public class Horse
|
|
{
|
|
public int Id { get; private set; }
|
|
public string HorseSpecies { get; private set; } = string.Empty;
|
|
public string HorseNickName { get; private set; } = string.Empty;
|
|
public int Age { get; private set; }
|
|
public double Weight { get; private set; }
|
|
public static Horse CreateEntity(int id, string horseSpecies, string
|
|
horseNickName, int age, double weight)
|
|
{
|
|
return new Horse
|
|
{
|
|
Id = id,
|
|
HorseSpecies = horseSpecies ?? string.Empty,
|
|
HorseNickName = horseNickName ?? string.Empty,
|
|
Age = age,
|
|
Weight = weight
|
|
};
|
|
}
|
|
}
|