PIBD_21_Basalov_A_D_Project.../project/ProjectTourAgency/Enities/Route.cs

28 lines
691 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectTourAgency.Enities;
public class Route
{
public int Id { get; private set; }
public string Destination { get; private set; } = string.Empty;
public string Departure { get; private set; } = string.Empty;
public int Duration { get; private set; }
public static Route CreateEntity(int id, string destination,
string departure, int duration)
{
return new Route
{
Id = id,
Destination = destination,
Departure = departure,
Duration = duration
};
}
}