zeroframework/Services/DeviceCenter/ZeroFramework.DeviceCenter.Domain/Entities/BaseEntity.cs

20 lines
423 B
C#
Raw Normal View History

2023-12-05 09:22:48 +00:00
using System.Diagnostics.CodeAnalysis;
namespace ZeroFramework.DeviceCenter.Domain.Entities
{
public abstract class BaseEntity
{
public abstract object[] GetKeys();
}
public abstract class BaseEntity<TKey> : BaseEntity
{
[AllowNull]
public TKey Id { get; set; }
public override object[] GetKeys()
{
return new object[] { Id! };
}
}
}