55 lines
1.5 KiB
C#
55 lines
1.5 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using xCategoryService.Providers;
|
|
using xDataService.Configuration;
|
|
using xDataService.Db;
|
|
using xDataService.Providers;
|
|
using xFileService.Providers;
|
|
using xServices.Models.Entities;
|
|
using xStringService.Providers;
|
|
using xTagService.Providers;
|
|
using xWebinarService.Providers;
|
|
// using xStringService.Models.Entities;
|
|
|
|
namespace xServices.Databases
|
|
{
|
|
public class XApiDbContext : XDbContext
|
|
{
|
|
//
|
|
#region DbSets ...
|
|
public DbSet<XTest> Tests { get; set; }
|
|
#endregion
|
|
|
|
//
|
|
#region Navigation Property Entities ...
|
|
#endregion
|
|
|
|
public XApiDbContext(
|
|
DbContextOptions options,
|
|
XDataServiceConfiguration config,
|
|
XEntityRegisterarHandlerService dynamicEntityHandlers
|
|
) : base(
|
|
"xApiDb",
|
|
options,
|
|
config,
|
|
dynamicEntityHandlers,
|
|
new string[] {
|
|
nameof(XTagEntityRegisterar),
|
|
nameof(XFileEntityRegisterar),
|
|
nameof(XStringEntityRegisterar),
|
|
nameof(XWebinarEntityRegisterar),
|
|
nameof(XCategoryEntityRegisterar),
|
|
nameof(XSubCategoryEntityRegisterar),
|
|
nameof(XWebinarSubscriberEntityRegisterar),
|
|
}
|
|
)
|
|
{ }
|
|
|
|
//
|
|
public override void OnXModelCreating(ModelBuilder modelBuilder)
|
|
{ }
|
|
|
|
//
|
|
public override void OnXConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{ }
|
|
}
|
|
} |