28 lines
691 B
C#
28 lines
691 B
C#
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
|
|
};
|
|
}
|
|
|
|
}
|