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
@@ -0,0 +1,27 @@
using System;
using xContentService.Interfaces.Entities;
using xContentService.Models.Entities;
using xDataService.Configuration;
using xDataService.Db;
using xDataService.Interfaces;
using xDataService.Providers;
namespace xContentService.Providers.Entities
{
public class XContentEFRepository<TContext> : XBaseEFRepository<XContent, Guid, TContext>, IXContentRepository
where TContext : XDbContext
{
public XContentEFRepository(
IXUnitOfWorks<TContext> unitOfWorks,
XDataServiceConfiguration configuration,
IXContentKeyGenerator keyGenerator = null,
IXContentRepositoryEvents baseRepositoryEvents = null
) : base(
unitOfWorks,
configuration,
keyGenerator,
baseRepositoryEvents
)
{ }
}
}
+16
View File
@@ -0,0 +1,16 @@
using System;
using Microsoft.Extensions.Logging;
using xContentService.Interfaces.Entities;
using xContentService.Models.Entities;
using xPushService.Base;
namespace xContentService.Providers.Entities
{
public class XContentEntityHub : XBaseEntityHub<XContent, Guid>, IXContentEntityHub
{
public XContentEntityHub(
ILogger<XContentEntityHub> logger
) : base(logger)
{ }
}
}
@@ -0,0 +1,22 @@
using System;
using xContentService.Interfaces.Entities;
using xContentService.Models.Entities;
using xDataService.Configuration;
using xDataService.Providers;
namespace xContentService.Providers.Entities
{
public class XContentInMemoryRepository : XBaseInMemoryRepository<XContent, Guid>, IXContentRepository
{
public XContentInMemoryRepository(
XDataServiceConfiguration configuration,
IXContentKeyGenerator keyGenerator = null,
IXContentRepositoryEvents baseRepositoryEvents = null
) : base(
configuration,
keyGenerator,
baseRepositoryEvents
)
{ }
}
}
@@ -0,0 +1,9 @@
using xContentService.Interfaces.Entities;
using xContentService.Models.Entities;
using xDataService.Providers;
namespace xContentService.Providers.Entities
{
public class XContentKeyGenerator : XGuidKeyGenerator<XContent>, IXContentKeyGenerator
{ }
}
@@ -0,0 +1,26 @@
using System;
using xContentService.Interfaces.Entities;
using xContentService.Models.Entities;
using xDataService.Configuration;
using xDataService.Providers;
namespace xContentService.Providers.Entities
{
public class XContentMongoRepository : XBaseMongoRepository<XContent, Guid>, IXContentRepository
{
public XContentMongoRepository(
XDataBaseConfiguration dbConfiguration,
XDataServiceConfiguration configuration,
string collectionName = null,
IXContentKeyGenerator keyGenerator = null,
IXContentRepositoryEvents baseRepositoryEvents = null
) : base(
dbConfiguration,
configuration,
collectionName,
keyGenerator,
baseRepositoryEvents
)
{ }
}
}
@@ -0,0 +1,9 @@
using xContentService.Interfaces.Entities;
using xContentService.Models.Entities;
using xDataService.Providers;
namespace xContentService.Providers.Entities
{
public class XContentRepositoryEvents : XBaseRepositoryEvents<XContent>, IXContentRepositoryEvents
{ }
}
@@ -0,0 +1,26 @@
using System;
using Microsoft.AspNetCore.SignalR;
using xContentService.Interfaces.Entities;
using xContentService.Models.Entities;
using xDataService.Configuration;
using xIdentityService.Interfaces;
using xPushService.Base;
namespace xContentService.Providers.Entities
{
public class XContentRepositoryProvider : XBaseEntityProvider<XContent, Guid, XContentEntityHub>, IXContentRepositoryProvider
{
public XContentRepositoryProvider(
IHubContext<XContentEntityHub> hub,
IXContentRepository repository,
XDataServiceConfiguration dataConfiguration,
IXIdentityProvider identityProvider = null
) : base(
hub,
repository,
dataConfiguration,
identityProvider
)
{ }
}
}
+24
View File
@@ -0,0 +1,24 @@
using System;
using xContentService.Interfaces.Entities;
using xContentService.Models.Entities;
using xDataService.Configuration;
using xDataService.Providers;
namespace xContentService.Providers.Entities
{
public abstract class XContentSeederBase : XBaseDbSeeder<XContent, Guid>, IXContentSeeder
{
protected XContentSeederBase(
string entity,
string database,
IXContentRepository repository,
XDataServiceConfiguration dataServiceConfiguration
) : base(
entity,
database,
repository,
dataServiceConfiguration
)
{ }
}
}