From 6b6790b61a9530a76ea2a076174e10b2bbfc4064 Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Fri, 8 May 2026 04:30:24 +0330 Subject: [PATCH] last ... --- DI/XDIHelperExtension.cs | 2 +- Databases/XApiDatabaseDescriptor.cs | 25 ++++++++++++++++++++++++ Databases/XApiDbContext.cs | 30 +++++++++++++++++++++++++++++ xServices.csproj | 4 +++- 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 Databases/XApiDatabaseDescriptor.cs create mode 100644 Databases/XApiDbContext.cs diff --git a/DI/XDIHelperExtension.cs b/DI/XDIHelperExtension.cs index 22b7074..0cc6393 100644 --- a/DI/XDIHelperExtension.cs +++ b/DI/XDIHelperExtension.cs @@ -9,7 +9,7 @@ using xStorageService.DI; namespace xServices.DI { - public static class XDIHelperExtension + public static partial class XDIHelperExtension { /// /// Retrive Services Configurations ... diff --git a/Databases/XApiDatabaseDescriptor.cs b/Databases/XApiDatabaseDescriptor.cs new file mode 100644 index 0000000..fec8514 --- /dev/null +++ b/Databases/XApiDatabaseDescriptor.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using xDataService.Interfaces; +using xDataService.Models; + +namespace xServices.Databases +{ + public class XApiDatabaseDescriptor : XDatabaseDescriptor, IXDatabaseDescriptor + { + public XApiDatabaseDescriptor() : base( + name: "xApiDb", + repositories: new List + { + // + // XTest Entity ... + // new XRepositoryDescriptor + // { + // // + // } + } + ) + { + // Context = XApiDbContext; + } + } +} \ No newline at end of file diff --git a/Databases/XApiDbContext.cs b/Databases/XApiDbContext.cs new file mode 100644 index 0000000..7e29eb4 --- /dev/null +++ b/Databases/XApiDbContext.cs @@ -0,0 +1,30 @@ +using Microsoft.EntityFrameworkCore; +using xDataService.Configuration; +using xDataService.Db; + +namespace xServices.Databases +{ + public class XApiDbContext : XDbContext + { + // + #region DbSets ... + #endregion + + // + #region Navigation Property Entities ... + #endregion + + public XApiDbContext( + DbContextOptions options, + XDataServiceConfiguration config + ) : base(options, config) { } + + // + public override void OnXModelCreating(ModelBuilder modelBuilder) + { } + + // + public override void OnXConfiguring(DbContextOptionsBuilder optionsBuilder) + { } + } +} \ No newline at end of file diff --git a/xServices.csproj b/xServices.csproj index a1047fa..e914d4f 100644 --- a/xServices.csproj +++ b/xServices.csproj @@ -29,8 +29,10 @@ + - + +