30 lines
694 B
C#
30 lines
694 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ProjectAirline.Entities;
|
|
|
|
public class Airplane
|
|
{
|
|
public int Id { get; private set; }
|
|
public string Country { get; private set; } = string.Empty;
|
|
public string Model { get; private set; } = string.Empty;
|
|
public int Capacity { get; private set; }
|
|
|
|
public static Airplane CreateEntity(int id, string country, string model, int capacity)
|
|
{
|
|
return new Airplane
|
|
{
|
|
Id = id,
|
|
Country = country ?? string.Empty,
|
|
Model = model ?? string.Empty,
|
|
Capacity = capacity
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|