Web Api layout
This commit is contained in:
parent
5619093f41
commit
da6d5576bf
32 changed files with 515 additions and 29 deletions
25
shared/InkForge.Data/Infrastructure/Entities.cs
Normal file
25
shared/InkForge.Data/Infrastructure/Entities.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using System.Numerics;
|
||||
|
||||
namespace InkForge.Data
|
||||
{
|
||||
public abstract class ValueEntity<TEntity>
|
||||
{
|
||||
public TEntity Value { get; set; } = default!;
|
||||
}
|
||||
|
||||
public abstract class Entity<TEntity, TKey>
|
||||
: ValueEntity<TEntity>
|
||||
where TKey : struct, INumber<TKey>
|
||||
{
|
||||
public TKey? Id { get; set; }
|
||||
}
|
||||
|
||||
public abstract class VersionedEntity<TEntity, TKey>
|
||||
: ValueEntity<TEntity>
|
||||
where TKey : struct, INumber<TKey>
|
||||
{
|
||||
public TKey Id { get; set; }
|
||||
|
||||
public int? Version { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue