Entities
Entities are uniquely identifiable by a combination of one or more attributes or properties
/// <summary>
/// Base entity class
/// </summary>
/// <typeparam name="TKey">The type of database primary key</typeparam>
public abstract class EntityBase<TKey>
where TKey : struct, IEquatable<TKey>
{
/// <summary>
/// Primary key
/// </summary>
[Key]
public TKey Id { get; internal set; }
}public class Passenger : EnttiyBase<long>
{
public string Name { get; private set; }
public string Surname { get; private set; }
}Last updated