17 lines
422 B
C#
17 lines
422 B
C#
using AyCode.Database.DbContexts;
|
|
|
|
namespace AyCode.Database.DataLayers;
|
|
|
|
public interface IDalBase //: IDisposable
|
|
{
|
|
public string Name { get; }
|
|
}
|
|
|
|
public interface IDalBase<TDbContext> : IDalBase where TDbContext : DbContextBase
|
|
{
|
|
public bool AutoCloseSession { get; set; }
|
|
public TDbContext Context { get; }
|
|
|
|
public TDbContext CreateDbContext();
|
|
public void CloseDbContext(ref TDbContext? ctx);
|
|
} |