adding Data Requirement on XContent Service ...

This commit is contained in:
2026-08-18 14:05:36 +03:30
parent 71fd4cea74
commit 0daa339d12
34 changed files with 1009 additions and 1 deletions
+282
View File
@@ -0,0 +1,282 @@
using System;
using GraphQL.Types;
using xContentService.Interfaces.Entities;
using xContentService.Models.Entities;
using xContentService.Providers.Entities;
using xContentService.Providers.GraphQL;
using xDataService.Db;
using xDataService.Models;
using xDataService.Providers;
namespace xContentService.Helpers
{
public static class XContentServiceHelper
{
//
#region XContent ...
//
#region EF Repository Descriptor Provider(s) ...
public static XEFRepositoryDescriptor<
XContent,
Guid,
IXContentKeyGenerator,
XContentKeyGenerator,
IXContentRepositoryEvents,
XContentRepositoryEvents,
XContentGraphType,
GuidGraphType,
XContentGraphQuery,
IXContentGraphQLTypeHelper,
XContentGraphQLTypeHelper,
XContentGraphSchema,
IXContentRepository,
XContentEFRepository<TContext>,
TContext
> GetXContentEFRepositoryDescriptor<TContext>()
where TContext : XDbContext
{
//
var result = new XEFRepositoryDescriptor<
XContent,
Guid,
IXContentKeyGenerator,
XContentKeyGenerator,
IXContentRepositoryEvents,
XContentRepositoryEvents,
XContentGraphType,
GuidGraphType,
XContentGraphQuery,
IXContentGraphQLTypeHelper,
XContentGraphQLTypeHelper,
XContentGraphSchema,
IXContentRepository,
XContentEFRepository<TContext>,
TContext
>();
//
return result;
}
public static XEFRepositoryDescriptor<
XContent,
Guid,
IXContentKeyGenerator,
XContentKeyGenerator,
IXContentRepositoryEvents,
XContentRepositoryEvents,
XContentGraphType,
GuidGraphType,
XContentGraphQuery,
IXContentGraphQLTypeHelper,
XContentGraphQLTypeHelper,
XContentGraphSchema,
IXContentRepository,
XContentEFRepository<TContext>,
TContext,
IXContentSeeder,
TSeederImplementation
> GetXContentEFRepositoryDescriptor<TContext, TSeederImplementation>()
where TContext : XDbContext
where TSeederImplementation : XBaseDbSeeder<XContent, Guid>
{
//
var result = new XEFRepositoryDescriptor<
XContent,
Guid,
IXContentKeyGenerator,
XContentKeyGenerator,
IXContentRepositoryEvents,
XContentRepositoryEvents,
XContentGraphType,
GuidGraphType,
XContentGraphQuery,
IXContentGraphQLTypeHelper,
XContentGraphQLTypeHelper,
XContentGraphSchema,
IXContentRepository,
XContentEFRepository<TContext>,
TContext,
IXContentSeeder,
TSeederImplementation
>();
//
return result;
}
#endregion
//
#region Mongo Repository Descriptor Provider(s) ...
public static XMongoRepositoryDescriptor<
XContent,
Guid,
IXContentKeyGenerator,
XContentKeyGenerator,
IXContentRepositoryEvents,
XContentRepositoryEvents,
XContentGraphType,
GuidGraphType,
XContentGraphQuery,
IXContentGraphQLTypeHelper,
XContentGraphQLTypeHelper,
XContentGraphSchema,
IXContentRepository,
XContentMongoRepository
> GetXContentMongoRepositoryDescriptor()
{
//
var result = new XMongoRepositoryDescriptor<
XContent,
Guid,
IXContentKeyGenerator,
XContentKeyGenerator,
IXContentRepositoryEvents,
XContentRepositoryEvents,
XContentGraphType,
GuidGraphType,
XContentGraphQuery,
IXContentGraphQLTypeHelper,
XContentGraphQLTypeHelper,
XContentGraphSchema,
IXContentRepository,
XContentMongoRepository
>();
//
return result;
}
public static XMongoRepositoryDescriptor<
XContent,
Guid,
IXContentKeyGenerator,
XContentKeyGenerator,
IXContentRepositoryEvents,
XContentRepositoryEvents,
XContentGraphType,
GuidGraphType,
XContentGraphQuery,
IXContentGraphQLTypeHelper,
XContentGraphQLTypeHelper,
XContentGraphSchema,
IXContentRepository,
XContentMongoRepository,
IXContentSeeder,
TSeederImplementation
> GetXContentMongoRepositoryDescriptor<TSeederImplementation>()
where TSeederImplementation : XBaseDbSeeder<XContent, Guid>
{
//
var result = new XMongoRepositoryDescriptor<
XContent,
Guid,
IXContentKeyGenerator,
XContentKeyGenerator,
IXContentRepositoryEvents,
XContentRepositoryEvents,
XContentGraphType,
GuidGraphType,
XContentGraphQuery,
IXContentGraphQLTypeHelper,
XContentGraphQLTypeHelper,
XContentGraphSchema,
IXContentRepository,
XContentMongoRepository,
IXContentSeeder,
TSeederImplementation
>();
//
return result;
}
#endregion
//
#region InMemory Repository Descriptor Provider(s) ...
public static XInMemoryRepositoryDescriptor<
XContent,
Guid,
IXContentKeyGenerator,
XContentKeyGenerator,
IXContentRepositoryEvents,
XContentRepositoryEvents,
XContentGraphType,
GuidGraphType,
XContentGraphQuery,
IXContentGraphQLTypeHelper,
XContentGraphQLTypeHelper,
XContentGraphSchema,
IXContentRepository,
XContentInMemoryRepository
> GetXContentInMemoryRepositoryDescriptor()
{
//
var result = new XInMemoryRepositoryDescriptor<
XContent,
Guid,
IXContentKeyGenerator,
XContentKeyGenerator,
IXContentRepositoryEvents,
XContentRepositoryEvents,
XContentGraphType,
GuidGraphType,
XContentGraphQuery,
IXContentGraphQLTypeHelper,
XContentGraphQLTypeHelper,
XContentGraphSchema,
IXContentRepository,
XContentInMemoryRepository
>();
//
return result;
}
public static XInMemoryRepositoryDescriptor<
XContent,
Guid,
IXContentKeyGenerator,
XContentKeyGenerator,
IXContentRepositoryEvents,
XContentRepositoryEvents,
XContentGraphType,
GuidGraphType,
XContentGraphQuery,
IXContentGraphQLTypeHelper,
XContentGraphQLTypeHelper,
XContentGraphSchema,
IXContentRepository,
XContentInMemoryRepository,
IXContentSeeder,
TSeederImplementation
> GetXContentInMemoryRepositoryDescriptor<TSeederImplementation>()
where TSeederImplementation : XBaseDbSeeder<XContent, Guid>
{
//
var result = new XInMemoryRepositoryDescriptor<
XContent,
Guid,
IXContentKeyGenerator,
XContentKeyGenerator,
IXContentRepositoryEvents,
XContentRepositoryEvents,
XContentGraphType,
GuidGraphType,
XContentGraphQuery,
IXContentGraphQLTypeHelper,
XContentGraphQLTypeHelper,
XContentGraphSchema,
IXContentRepository,
XContentInMemoryRepository,
IXContentSeeder,
TSeederImplementation
>();
//
return result;
}
#endregion
#endregion
}
}