improvements
This commit is contained in:
parent
3e6ba01df2
commit
3928343996
|
|
@ -6,7 +6,7 @@ using Microsoft.Extensions.Configuration;
|
|||
|
||||
namespace AyCode.Database.DbContexts;
|
||||
|
||||
public abstract class AcDbContextBase : DbContext
|
||||
public abstract class AcDbContextBase : DbContext, IAcDbContextBase
|
||||
{
|
||||
private readonly string? _connString;
|
||||
public string Name { get; set; }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
namespace AyCode.Database.DbContexts;
|
||||
|
||||
public interface IAcDbContextBase
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public Guid SessionId { get; }
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using AyCode.Interfaces.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
|
||||
namespace AyCode.Database.DbSets;
|
||||
|
||||
public class AcDbTableBase<TEntity> : DbSet<TEntity>, IAcDbTableBase where TEntity : class, IEntity
|
||||
{
|
||||
public override IEntityType EntityType { get; } = null!;
|
||||
}
|
||||
|
||||
public interface IAcDbTableBase
|
||||
{
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue