d254873172
- HrynCo.DAL.Abstract: IEntity<TId>, Entity base classes, ITransaction, IUnitOfWork - HrynCo.DAL.EF: EfRepository<TDbContext,TEntity>, EfUnitOfWork<TDbContext>, EfTransactionAdapter - Directory.Packages.props with centralized EF Core 9.0.5 versions - TeamCity pipeline YAMLs for general-checks and publish Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
26 lines
527 B
C#
26 lines
527 B
C#
namespace HrynCo.DAL.Abstract.Entities;
|
|
|
|
[Serializable]
|
|
public abstract class Entity<TId> : IEntity<TId> where TId : struct
|
|
{
|
|
public TId Id { get; set; }
|
|
public DateTimeOffset Created { get; set; }
|
|
public DateTimeOffset? Updated { get; set; }
|
|
}
|
|
|
|
[Serializable]
|
|
public abstract class Entity : Entity<Guid>
|
|
{
|
|
protected Entity()
|
|
{
|
|
Id = Guid.NewGuid();
|
|
Created = DateTimeOffset.UtcNow;
|
|
}
|
|
|
|
protected Entity(Guid id)
|
|
{
|
|
Id = id;
|
|
Created = DateTimeOffset.UtcNow;
|
|
}
|
|
}
|