This commit is contained in:
2026-05-13 23:26:37 +03:30
parent 99dc78ee4b
commit 2a88195d15
2 changed files with 2 additions and 516 deletions
+1 -515
View File
@@ -1185,521 +1185,6 @@ namespace xDataService.Helpers
}
}
/// <summary>
/// Register Repository ...
/// </summary>
/// <param name="source"></param>
/// <param name="repositoryDescriptor"></param>
/// <param name="lifetime"></param>
/// <typeparam name="TEntity"></typeparam>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TKeyGeneratorService"></typeparam>
/// <typeparam name="TKeyGeneratorImplementation"></typeparam>
/// <typeparam name="TEventsService"></typeparam>
/// <typeparam name="TEventsImplementation"></typeparam>
/// <typeparam name="TGraph"></typeparam>
/// <typeparam name="TGraphKey"></typeparam>
/// <typeparam name="TGraphQuery"></typeparam>
/// <typeparam name="TGraphTypeHelperService"></typeparam>
/// <typeparam name="TGraphTypeHelperImplementation"></typeparam>
/// <typeparam name="TGraphSchema"></typeparam>
/// <typeparam name="TRepositoryService"></typeparam>
/// <typeparam name="TRepositoryImplementation"></typeparam>
/// <returns></returns>
public static void UseXRepository<
TEntity,
TKey,
TKeyGeneratorService,
TKeyGeneratorImplementation,
TEventsService,
TEventsImplementation,
TGraph,
TGraphKey,
TGraphQuery,
TGraphTypeHelperService,
TGraphTypeHelperImplementation,
TGraphSchema,
TRepositoryService,
TRepositoryImplementation
>(
IApplicationBuilder source,
XInMemoryRepositoryDescriptor<TEntity, TKey, TKeyGeneratorService, TKeyGeneratorImplementation, TEventsService, TEventsImplementation, TGraph, TGraphKey, TGraphQuery, TGraphTypeHelperService, TGraphTypeHelperImplementation, TGraphSchema, TRepositoryService, TRepositoryImplementation> repositoryDescriptor
)
where TGraphSchema : Schema
where TGraphKey : IGraphType
where TEntity : XBaseEntity<TKey>
where TGraph : XBaseGraphObjectType<TEntity, TKey>
where TEventsService : IXBaseRepositoryEvents<TEntity>
where TKeyGeneratorService : IXKeyGenerator<TEntity, TKey>
where TRepositoryService : IXBaseRepository<TEntity, TKey>
where TEventsImplementation : XBaseRepositoryEvents<TEntity>
where TKeyGeneratorImplementation : XKeyGenerator<TEntity, TKey>
where TGraphTypeHelperService : IXBaseGraphQLTypeHelper<TEntity, TKey>
where TRepositoryImplementation : XBaseInMemoryRepository<TEntity, TKey>
where TGraphQuery : XBaseGraphQLQuery<TEntity, TKey, TGraph, TGraphKey>
where TGraphTypeHelperImplementation : XBaseGraphQLTypeHelper<TEntity, TKey>
{
//
// Validate Args ...
var isValid = repositoryDescriptor.IsValid();
if (!isValid)
{
return;
}
//
// Chck Seeders ...
isValid = repositoryDescriptor.HasSeeder();
if (isValid)
{
}
//
// GraphQL ...
isValid = repositoryDescriptor.HasGraphSupport();
if (isValid)
{
//
// UseXGraphQL<TEntity, TKey, TGraph, TGraphKey, TGraphQuery, TGraphTypeHelperService, TGraphTypeHelperImplementation, TGraphSchema>(
// source,
// repositoryDescriptor
// );
}
}
/// <summary>
/// Register Repository ...
/// </summary>
/// <param name="source"></param>
/// <param name="repositoryDescriptor"></param>
/// <param name="lifetime"></param>
/// <typeparam name="TEntity"></typeparam>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TKeyGeneratorService"></typeparam>
/// <typeparam name="TKeyGeneratorImplementation"></typeparam>
/// <typeparam name="TEventsService"></typeparam>
/// <typeparam name="TEventsImplementation"></typeparam>
/// <typeparam name="TGraph"></typeparam>
/// <typeparam name="TGraphKey"></typeparam>
/// <typeparam name="TGraphQuery"></typeparam>
/// <typeparam name="TGraphTypeHelperService"></typeparam>
/// <typeparam name="TGraphTypeHelperImplementation"></typeparam>
/// <typeparam name="TGraphSchema"></typeparam>
/// <typeparam name="TRepositoryService"></typeparam>
/// <typeparam name="TRepositoryImplementation"></typeparam>
/// <typeparam name="TSeederService"></typeparam>
/// <typeparam name="TSeederImplementation"></typeparam>
/// <returns></returns>
public static void UseXRepository<
TEntity,
TKey,
TKeyGeneratorService,
TKeyGeneratorImplementation,
TEventsService,
TEventsImplementation,
TGraph,
TGraphKey,
TGraphQuery,
TGraphTypeHelperService,
TGraphTypeHelperImplementation,
TGraphSchema,
TRepositoryService,
TRepositoryImplementation,
TSeederService,
TSeederImplementation
>(
IApplicationBuilder source,
XInMemoryRepositoryDescriptor<TEntity, TKey, TKeyGeneratorService, TKeyGeneratorImplementation, TEventsService, TEventsImplementation, TGraph, TGraphKey, TGraphQuery, TGraphTypeHelperService, TGraphTypeHelperImplementation, TGraphSchema, TRepositoryService, TRepositoryImplementation, TSeederService, TSeederImplementation> repositoryDescriptor
)
where TGraphSchema : Schema
where TGraphKey : IGraphType
where TEntity : XBaseEntity<TKey>
where TGraph : XBaseGraphObjectType<TEntity, TKey>
where TSeederService : IXBaseDbSeeder<TEntity, TKey>
where TEventsService : IXBaseRepositoryEvents<TEntity>
where TSeederImplementation : XBaseDbSeeder<TEntity, TKey>
where TKeyGeneratorService : IXKeyGenerator<TEntity, TKey>
where TRepositoryService : IXBaseRepository<TEntity, TKey>
where TEventsImplementation : XBaseRepositoryEvents<TEntity>
where TKeyGeneratorImplementation : XKeyGenerator<TEntity, TKey>
where TGraphTypeHelperService : IXBaseGraphQLTypeHelper<TEntity, TKey>
where TRepositoryImplementation : XBaseInMemoryRepository<TEntity, TKey>
where TGraphQuery : XBaseGraphQLQuery<TEntity, TKey, TGraph, TGraphKey>
where TGraphTypeHelperImplementation : XBaseGraphQLTypeHelper<TEntity, TKey>
{
//
// Validate Args ...
var isValid = repositoryDescriptor.IsValid();
if (!isValid)
{
return;
}
//
// Chck Seeders ...
isValid = repositoryDescriptor.HasSeeder();
if (isValid)
{
}
//
// GraphQL ...
isValid = repositoryDescriptor.HasGraphSupport();
if (isValid)
{
//
// UseXGraphQL<TEntity, TKey, TGraph, TGraphKey, TGraphQuery, TGraphTypeHelperService, TGraphTypeHelperImplementation, TGraphSchema>(
// source,
// repositoryDescriptor
// );
}
}
/// <summary>
/// Register Repository ...
/// </summary>
/// <param name="source"></param>
/// <param name="repositoryDescriptor"></param>
/// <param name="lifetime"></param>
/// <typeparam name="TEntity"></typeparam>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TKeyGeneratorService"></typeparam>
/// <typeparam name="TKeyGeneratorImplementation"></typeparam>
/// <typeparam name="TEventsService"></typeparam>
/// <typeparam name="TEventsImplementation"></typeparam>
/// <typeparam name="TGraph"></typeparam>
/// <typeparam name="TGraphKey"></typeparam>
/// <typeparam name="TGraphQuery"></typeparam>
/// <typeparam name="TGraphTypeHelperService"></typeparam>
/// <typeparam name="TGraphTypeHelperImplementation"></typeparam>
/// <typeparam name="TGraphSchema"></typeparam>
/// <typeparam name="TRepositoryService"></typeparam>
/// <typeparam name="TRepositoryImplementation"></typeparam>
/// <returns></returns>
public static void UseXRepository<
TEntity,
TKey,
TKeyGeneratorService,
TKeyGeneratorImplementation,
TEventsService,
TEventsImplementation,
TGraph,
TGraphKey,
TGraphQuery,
TGraphTypeHelperService,
TGraphTypeHelperImplementation,
TGraphSchema,
TRepositoryService,
TRepositoryImplementation
>(
IApplicationBuilder source,
XMongoRepositoryDescriptor<TEntity, TKey, TKeyGeneratorService, TKeyGeneratorImplementation, TEventsService, TEventsImplementation, TGraph, TGraphKey, TGraphQuery, TGraphTypeHelperService, TGraphTypeHelperImplementation, TGraphSchema, TRepositoryService, TRepositoryImplementation> repositoryDescriptor
)
where TGraphSchema : Schema
where TGraphKey : IGraphType
where TEntity : XBaseEntity<TKey>
where TGraph : XBaseGraphObjectType<TEntity, TKey>
where TEventsService : IXBaseRepositoryEvents<TEntity>
where TKeyGeneratorService : IXKeyGenerator<TEntity, TKey>
where TRepositoryService : IXBaseRepository<TEntity, TKey>
where TEventsImplementation : XBaseRepositoryEvents<TEntity>
where TKeyGeneratorImplementation : XKeyGenerator<TEntity, TKey>
where TRepositoryImplementation : XBaseMongoRepository<TEntity, TKey>
where TGraphTypeHelperService : IXBaseGraphQLTypeHelper<TEntity, TKey>
where TGraphQuery : XBaseGraphQLQuery<TEntity, TKey, TGraph, TGraphKey>
where TGraphTypeHelperImplementation : XBaseGraphQLTypeHelper<TEntity, TKey>
{
//
// Validate Args ...
var isValid = repositoryDescriptor.IsValid();
if (!isValid)
{
return;
}
//
// Chck Seeders ...
isValid = repositoryDescriptor.HasSeeder();
if (isValid)
{
}
//
// GraphQL ...
isValid = repositoryDescriptor.HasGraphSupport();
if (isValid)
{
//
// UseXGraphQL<TEntity, TKey, TGraph, TGraphKey, TGraphQuery, TGraphTypeHelperService, TGraphTypeHelperImplementation, TGraphSchema>(
// source,
// repositoryDescriptor
// );
}
}
/// <summary>
/// Register Repository ...
/// </summary>
/// <param name="source"></param>
/// <param name="repositoryDescriptor"></param>
/// <param name="lifetime"></param>
/// <typeparam name="TEntity"></typeparam>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TKeyGeneratorService"></typeparam>
/// <typeparam name="TKeyGeneratorImplementation"></typeparam>
/// <typeparam name="TEventsService"></typeparam>
/// <typeparam name="TEventsImplementation"></typeparam>
/// <typeparam name="TGraph"></typeparam>
/// <typeparam name="TGraphKey"></typeparam>
/// <typeparam name="TGraphQuery"></typeparam>
/// <typeparam name="TGraphTypeHelperService"></typeparam>
/// <typeparam name="TGraphTypeHelperImplementation"></typeparam>
/// <typeparam name="TGraphSchema"></typeparam>
/// <typeparam name="TRepositoryService"></typeparam>
/// <typeparam name="TRepositoryImplementation"></typeparam>
/// <typeparam name="TSeederService"></typeparam>
/// <typeparam name="TSeederImplementation"></typeparam>
/// <returns></returns>
public static void UseXRepository<
TEntity,
TKey,
TKeyGeneratorService,
TKeyGeneratorImplementation,
TEventsService,
TEventsImplementation,
TGraph,
TGraphKey,
TGraphQuery,
TGraphTypeHelperService,
TGraphTypeHelperImplementation,
TGraphSchema,
TRepositoryService,
TRepositoryImplementation,
TSeederService,
TSeederImplementation
>(
IApplicationBuilder source,
XMongoRepositoryDescriptor<TEntity, TKey, TKeyGeneratorService, TKeyGeneratorImplementation, TEventsService, TEventsImplementation, TGraph, TGraphKey, TGraphQuery, TGraphTypeHelperService, TGraphTypeHelperImplementation, TGraphSchema, TRepositoryService, TRepositoryImplementation, TSeederService, TSeederImplementation> repositoryDescriptor
)
where TGraphSchema : Schema
where TGraphKey : IGraphType
where TEntity : XBaseEntity<TKey>
where TGraph : XBaseGraphObjectType<TEntity, TKey>
where TSeederService : IXBaseDbSeeder<TEntity, TKey>
where TEventsService : IXBaseRepositoryEvents<TEntity>
where TSeederImplementation : XBaseDbSeeder<TEntity, TKey>
where TKeyGeneratorService : IXKeyGenerator<TEntity, TKey>
where TRepositoryService : IXBaseRepository<TEntity, TKey>
where TEventsImplementation : XBaseRepositoryEvents<TEntity>
where TKeyGeneratorImplementation : XKeyGenerator<TEntity, TKey>
where TRepositoryImplementation : XBaseMongoRepository<TEntity, TKey>
where TGraphTypeHelperService : IXBaseGraphQLTypeHelper<TEntity, TKey>
where TGraphQuery : XBaseGraphQLQuery<TEntity, TKey, TGraph, TGraphKey>
where TGraphTypeHelperImplementation : XBaseGraphQLTypeHelper<TEntity, TKey>
{
//
// Validate Args ...
var isValid = repositoryDescriptor.IsValid();
if (!isValid)
{
return;
}
//
// Chck Seeders ...
isValid = repositoryDescriptor.HasSeeder();
if (isValid)
{
}
//
// GraphQL ...
isValid = repositoryDescriptor.HasGraphSupport();
if (isValid)
{
//
// UseXGraphQL<TEntity, TKey, TGraph, TGraphKey, TGraphQuery, TGraphTypeHelperService, TGraphTypeHelperImplementation, TGraphSchema>(
// source,
// repositoryDescriptor
// );
}
}
/// <summary>
/// Register Repository ...
/// </summary>
/// <param name="source"></param>
/// <param name="repositoryDescriptor"></param>
/// <param name="lifetime"></param>
/// <typeparam name="TEntity"></typeparam>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TKeyGeneratorService"></typeparam>
/// <typeparam name="TKeyGeneratorImplementation"></typeparam>
/// <typeparam name="TEventsService"></typeparam>
/// <typeparam name="TEventsImplementation"></typeparam>
/// <typeparam name="TGraph"></typeparam>
/// <typeparam name="TGraphKey"></typeparam>
/// <typeparam name="TGraphQuery"></typeparam>
/// <typeparam name="TGraphTypeHelperService"></typeparam>
/// <typeparam name="TGraphTypeHelperImplementation"></typeparam>
/// <typeparam name="TGraphSchema"></typeparam>
/// <typeparam name="TRepositoryService"></typeparam>
/// <typeparam name="TRepositoryImplementation"></typeparam>
/// <returns></returns>
public static void UseXRepository<
TEntity,
TKey,
TKeyGeneratorService,
TKeyGeneratorImplementation,
TEventsService,
TEventsImplementation,
TGraph,
TGraphKey,
TGraphQuery,
TGraphTypeHelperService,
TGraphTypeHelperImplementation,
TGraphSchema,
TRepositoryService,
TRepositoryImplementation,
TContext
>(
IApplicationBuilder source,
XEFRepositoryDescriptor<TEntity, TKey, TKeyGeneratorService, TKeyGeneratorImplementation, TEventsService, TEventsImplementation, TGraph, TGraphKey, TGraphQuery, TGraphTypeHelperService, TGraphTypeHelperImplementation, TGraphSchema, TRepositoryService, TRepositoryImplementation, TContext> repositoryDescriptor
)
where TGraphSchema : Schema
where TContext : XDbContext
where TGraphKey : IGraphType
where TEntity : XBaseEntity<TKey>
where TGraph : XBaseGraphObjectType<TEntity, TKey>
where TEventsService : IXBaseRepositoryEvents<TEntity>
where TKeyGeneratorService : IXKeyGenerator<TEntity, TKey>
where TRepositoryService : IXBaseRepository<TEntity, TKey>
where TEventsImplementation : XBaseRepositoryEvents<TEntity>
where TKeyGeneratorImplementation : XKeyGenerator<TEntity, TKey>
where TGraphTypeHelperService : IXBaseGraphQLTypeHelper<TEntity, TKey>
where TGraphQuery : XBaseGraphQLQuery<TEntity, TKey, TGraph, TGraphKey>
where TRepositoryImplementation : XBaseEFRepository<TEntity, TKey, TContext>
where TGraphTypeHelperImplementation : XBaseGraphQLTypeHelper<TEntity, TKey>
{
//
// Validate Args ...
var isValid = repositoryDescriptor.IsValid();
if (!isValid)
{
return;
}
//
// Chck Seeders ...
isValid = repositoryDescriptor.HasSeeder();
if (isValid)
{
}
//
// GraphQL ...
isValid = repositoryDescriptor.HasGraphSupport();
if (isValid)
{
// //
// UseXGraphQL<TEntity, TKey, TGraph, TGraphKey, TGraphQuery, TGraphTypeHelperService, TGraphTypeHelperImplementation, TGraphSchema>(
// source,
// repositoryDescriptor
// );
}
}
/// <summary>
/// Register Repository ...
/// </summary>
/// <param name="source"></param>
/// <param name="repositoryDescriptor"></param>
/// <param name="lifetime"></param>
/// <typeparam name="TEntity"></typeparam>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TKeyGeneratorService"></typeparam>
/// <typeparam name="TKeyGeneratorImplementation"></typeparam>
/// <typeparam name="TEventsService"></typeparam>
/// <typeparam name="TEventsImplementation"></typeparam>
/// <typeparam name="TGraph"></typeparam>
/// <typeparam name="TGraphKey"></typeparam>
/// <typeparam name="TGraphQuery"></typeparam>
/// <typeparam name="TGraphTypeHelperService"></typeparam>
/// <typeparam name="TGraphTypeHelperImplementation"></typeparam>
/// <typeparam name="TGraphSchema"></typeparam>
/// <typeparam name="TRepositoryService"></typeparam>
/// <typeparam name="TRepositoryImplementation"></typeparam>
/// <typeparam name="TSeederService"></typeparam>
/// <typeparam name="TSeederImplementation"></typeparam>
/// <returns></returns>
public static void UseXRepository<
TEntity,
TKey,
TKeyGeneratorService,
TKeyGeneratorImplementation,
TEventsService,
TEventsImplementation,
TGraph,
TGraphKey,
TGraphQuery,
TGraphTypeHelperService,
TGraphTypeHelperImplementation,
TGraphSchema,
TRepositoryService,
TRepositoryImplementation,
TContext,
TSeederService,
TSeederImplementation
>(
IApplicationBuilder source,
XEFRepositoryDescriptor<TEntity, TKey, TKeyGeneratorService, TKeyGeneratorImplementation, TEventsService, TEventsImplementation, TGraph, TGraphKey, TGraphQuery, TGraphTypeHelperService, TGraphTypeHelperImplementation, TGraphSchema, TRepositoryService, TRepositoryImplementation, TContext, TSeederService, TSeederImplementation> repositoryDescriptor
)
where TGraphSchema : Schema
where TContext : XDbContext
where TGraphKey : IGraphType
where TEntity : XBaseEntity<TKey>
where TGraph : XBaseGraphObjectType<TEntity, TKey>
where TSeederService : IXBaseDbSeeder<TEntity, TKey>
where TEventsService : IXBaseRepositoryEvents<TEntity>
where TSeederImplementation : XBaseDbSeeder<TEntity, TKey>
where TKeyGeneratorService : IXKeyGenerator<TEntity, TKey>
where TRepositoryService : IXBaseRepository<TEntity, TKey>
where TEventsImplementation : XBaseRepositoryEvents<TEntity>
where TKeyGeneratorImplementation : XKeyGenerator<TEntity, TKey>
where TGraphTypeHelperService : IXBaseGraphQLTypeHelper<TEntity, TKey>
where TGraphQuery : XBaseGraphQLQuery<TEntity, TKey, TGraph, TGraphKey>
where TRepositoryImplementation : XBaseEFRepository<TEntity, TKey, TContext>
where TGraphTypeHelperImplementation : XBaseGraphQLTypeHelper<TEntity, TKey>
{
//
// Validate Args ...
var isValid = repositoryDescriptor.IsValid();
if (!isValid)
{
return;
}
//
// Chck Seeders ...
isValid = repositoryDescriptor.HasSeeder();
if (isValid)
{
}
//
// GraphQL ...
isValid = repositoryDescriptor.HasGraphSupport();
if (isValid)
{
// //
// UseXGraphQL<TEntity, TKey, TGraph, TGraphKey, TGraphQuery, TGraphTypeHelperService, TGraphTypeHelperImplementation, TGraphSchema>(
// source,
// repositoryDescriptor
// );
}
}
/// <summary>
/// Use GraphQL ...
/// </summary>
@@ -1751,6 +1236,7 @@ namespace xDataService.Helpers
options = new GraphQLPlaygroundOptions();
}
options.Path = "/ui/playground";
options.GraphQLEndPoint = graphPath;
//
source.UseGraphQLPlayground(options);
+1 -1
View File
@@ -52,7 +52,7 @@
<ItemGroup>
<PackageReference Include="System.Reactive" Version="5.0.0" />
<PackageReference Include="MySql.EntityFrameworkCore" Version="3.1.14" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="3.19.180" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="3.1.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.14">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>