implement Webinar and WebinarSubscriber Entity and Dto (s) and Data Requirements ...

This commit is contained in:
2026-07-24 19:46:35 +03:30
parent cf6568e089
commit d2d3ac90b6
82 changed files with 1466 additions and 4889 deletions
View File
+17
View File
@@ -0,0 +1,17 @@
using System;
using Microsoft.Extensions.Logging;
using xPushService.Base;
using xWebinarService.Interfaces.Dtos;
using xWebinarService.Models.Dtos;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Dtos
{
public class XWebinarDtoHub : XBaseDtoHub<XWebinar, XWebinarDto, Guid>, IXWebinarDtoHub
{
public XWebinarDtoHub(
ILogger<XWebinarDtoHub> logger
) : base(logger)
{ }
}
}
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using AutoMapper;
using xDataService.Providers;
using xWebinarService.Interfaces.Dtos;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Dtos;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Dtos
{
public class XWebinarRepositoryService : XBaseRepositoryService<XWebinar, XWebinarDto, Guid>, IXWebinarRepositoryService
{
public XWebinarRepositoryService(
IXWebinarRepository repository,
IEnumerable<Profile> mapperProfiles = null
) : base(
repository,
mapperProfiles
)
{ }
}
}
+27
View File
@@ -0,0 +1,27 @@
using System;
using Microsoft.AspNetCore.SignalR;
using xDataService.Configuration;
using xIdentityService.Interfaces;
using xPushService.Base;
using xWebinarService.Interfaces.Dtos;
using xWebinarService.Models.Dtos;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Dtos
{
public class XWebinarServiceProvider : XBaseDtoProvider<XWebinar, XWebinarDto, Guid, XWebinarDtoHub>, IXWebinarServiceProvider
{
public XWebinarServiceProvider(
IHubContext<XWebinarDtoHub> hub,
XDataServiceConfiguration dataConfiguration,
IXWebinarRepositoryService service,
IXIdentityProvider identityProvider = null
) : base(
hub,
dataConfiguration,
service,
identityProvider
)
{ }
}
}
@@ -0,0 +1,16 @@
using Microsoft.Extensions.Logging;
using xPushService.Base;
using xWebinarService.Interfaces.Dtos;
using xWebinarService.Models.Dtos;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Dtos
{
public class XWebinarSubscriberDtoHub : XBaseDtoHub<XWebinarSubscriber, XWebinarSubscriberDto, int>, IXWebinarSubscriberDtoHub
{
public XWebinarSubscriberDtoHub(
ILogger<XWebinarSubscriberDtoHub> logger
) : base(logger)
{ }
}
}
@@ -0,0 +1,22 @@
using System.Collections.Generic;
using AutoMapper;
using xDataService.Providers;
using xWebinarService.Interfaces.Dtos;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Dtos;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Dtos
{
public class XWebinarSubscriberRepositoryService : XBaseRepositoryService<XWebinarSubscriber, XWebinarSubscriberDto, int>, IXWebinarSubscriberRepositoryService
{
public XWebinarSubscriberRepositoryService(
IXWebinarSubscriberRepository repository,
IEnumerable<Profile> mapperProfiles = null
) : base(
repository,
mapperProfiles
)
{ }
}
}
@@ -0,0 +1,26 @@
using Microsoft.AspNetCore.SignalR;
using xDataService.Configuration;
using xIdentityService.Interfaces;
using xPushService.Base;
using xWebinarService.Interfaces.Dtos;
using xWebinarService.Models.Dtos;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Dtos
{
public class XWebinarSubscriberServiceProvider : XBaseDtoProvider<XWebinarSubscriber, XWebinarSubscriberDto, int, XWebinarSubscriberDtoHub>, IXWebinarSubscriberServiceProvider
{
public XWebinarSubscriberServiceProvider(
IHubContext<XWebinarSubscriberDtoHub> hub,
XDataServiceConfiguration dataConfiguration,
IXWebinarSubscriberRepositoryService service,
IXIdentityProvider identityProvider = null
) : base(
hub,
dataConfiguration,
service,
identityProvider
)
{ }
}
}
@@ -0,0 +1,27 @@
using System;
using xDataService.Configuration;
using xDataService.Db;
using xDataService.Interfaces;
using xDataService.Providers;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarEFRepository<TContext> : XBaseEFRepository<XWebinar, Guid, TContext>, IXWebinarRepository
where TContext : XDbContext
{
public XWebinarEFRepository(
IXUnitOfWorks<TContext> unitOfWorks,
XDataServiceConfiguration configuration,
IXWebinarKeyGenerator keyGenerator = null,
IXWebinarRepositoryEvents baseRepositoryEvents = null
) : base(
unitOfWorks,
configuration,
keyGenerator,
baseRepositoryEvents
)
{ }
}
}
+16
View File
@@ -0,0 +1,16 @@
using System;
using Microsoft.Extensions.Logging;
using xPushService.Base;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarEntityHub : XBaseEntityHub<XWebinar, Guid>, IXWebinarEntityHub
{
public XWebinarEntityHub(
ILogger<XWebinarEntityHub> logger
) : base(logger)
{ }
}
}
@@ -0,0 +1,22 @@
using System;
using xDataService.Configuration;
using xDataService.Providers;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarInMemoryRepository : XBaseInMemoryRepository<XWebinar, Guid>, IXWebinarRepository
{
public XWebinarInMemoryRepository(
XDataServiceConfiguration configuration,
IXWebinarKeyGenerator keyGenerator = null,
IXWebinarRepositoryEvents baseRepositoryEvents = null
) : base(
configuration,
keyGenerator,
baseRepositoryEvents
)
{ }
}
}
@@ -0,0 +1,9 @@
using xDataService.Providers;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarKeyGenerator : XGuidKeyGenerator<XWebinar>, IXWebinarKeyGenerator
{ }
}
@@ -0,0 +1,26 @@
using System;
using xDataService.Configuration;
using xDataService.Providers;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarMongoRepository : XBaseMongoRepository<XWebinar, Guid>, IXWebinarRepository
{
public XWebinarMongoRepository(
XDataBaseConfiguration dbConfiguration,
XDataServiceConfiguration configuration,
string collectionName = null,
IXWebinarKeyGenerator keyGenerator = null,
IXWebinarRepositoryEvents baseRepositoryEvents = null
) : base(
dbConfiguration,
configuration,
collectionName,
keyGenerator,
baseRepositoryEvents
)
{ }
}
}
@@ -0,0 +1,9 @@
using xDataService.Providers;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarRepositoryEvents : XBaseRepositoryEvents<XWebinar>, IXWebinarRepositoryEvents
{ }
}
@@ -0,0 +1,26 @@
using System;
using Microsoft.AspNetCore.SignalR;
using xDataService.Configuration;
using xIdentityService.Interfaces;
using xPushService.Base;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarRepositoryProvider : XBaseEntityProvider<XWebinar, Guid, XWebinarEntityHub>, IXWebinarRepositoryProvider
{
public XWebinarRepositoryProvider(
IHubContext<XWebinarEntityHub> hub,
IXWebinarRepository repository,
XDataServiceConfiguration dataConfiguration,
IXIdentityProvider identityProvider = null
) : base(
hub,
repository,
dataConfiguration,
identityProvider
)
{ }
}
}
@@ -0,0 +1,26 @@
using xDataService.Configuration;
using xDataService.Db;
using xDataService.Interfaces;
using xDataService.Providers;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarSubscriberEFRepository<TContext> : XBaseEFRepository<XWebinarSubscriber, int, TContext>, IXWebinarSubscriberRepository
where TContext : XDbContext
{
public XWebinarSubscriberEFRepository(
IXUnitOfWorks<TContext> unitOfWorks,
XDataServiceConfiguration configuration,
IXWebinarSubscriberKeyGenerator keyGenerator = null,
IXWebinarSubscriberRepositoryEvents baseRepositoryEvents = null
) : base(
unitOfWorks,
configuration,
keyGenerator,
baseRepositoryEvents
)
{ }
}
}
@@ -0,0 +1,15 @@
using Microsoft.Extensions.Logging;
using xPushService.Base;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarSubscriberEntityHub : XBaseEntityHub<XWebinarSubscriber, int>, IXWebinarSubscriberEntityHub
{
public XWebinarSubscriberEntityHub(
ILogger<XWebinarSubscriberEntityHub> logger
) : base(logger)
{ }
}
}
@@ -0,0 +1,21 @@
using xDataService.Configuration;
using xDataService.Providers;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarSubscriberInMemoryRepository : XBaseInMemoryRepository<XWebinarSubscriber, int>, IXWebinarSubscriberRepository
{
public XWebinarSubscriberInMemoryRepository(
XDataServiceConfiguration configuration,
IXWebinarSubscriberKeyGenerator keyGenerator = null,
IXWebinarSubscriberRepositoryEvents baseRepositoryEvents = null
) : base(
configuration,
keyGenerator,
baseRepositoryEvents
)
{ }
}
}
@@ -0,0 +1,9 @@
using xDataService.Providers;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarSubscriberKeyGenerator : XIntKeyGenerator<XWebinarSubscriber>, IXWebinarSubscriberKeyGenerator
{ }
}
@@ -0,0 +1,25 @@
using xDataService.Configuration;
using xDataService.Providers;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarSubscriberMongoRepository : XBaseMongoRepository<XWebinarSubscriber, int>, IXWebinarSubscriberRepository
{
public XWebinarSubscriberMongoRepository(
XDataBaseConfiguration dbConfiguration,
XDataServiceConfiguration configuration,
string collectionName = null,
IXWebinarSubscriberKeyGenerator keyGenerator = null,
IXWebinarSubscriberRepositoryEvents baseRepositoryEvents = null
) : base(
dbConfiguration,
configuration,
collectionName,
keyGenerator,
baseRepositoryEvents
)
{ }
}
}
@@ -0,0 +1,9 @@
using xDataService.Providers;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarSubscriberRepositoryEvents : XBaseRepositoryEvents<XWebinarSubscriber>, IXWebinarSubscriberRepositoryEvents
{ }
}
@@ -0,0 +1,26 @@
using System;
using Microsoft.AspNetCore.SignalR;
using xDataService.Configuration;
using xIdentityService.Interfaces;
using xPushService.Base;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.Entities
{
public class XWebinarSubscriberRepositoryProvider : XBaseEntityProvider<XWebinarSubscriber, int, XWebinarSubscriberEntityHub>, IXWebinarSubscriberRepositoryProvider
{
public XWebinarSubscriberRepositoryProvider(
IHubContext<XWebinarSubscriberEntityHub> hub,
IXWebinarSubscriberRepository repository,
XDataServiceConfiguration dataConfiguration,
IXIdentityProvider identityProvider = null
) : base(
hub,
repository,
dataConfiguration,
identityProvider
)
{ }
}
}
@@ -0,0 +1,26 @@
using System;
using xDataService.Configuration;
using xDataService.GraphQL;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.GraphQL
{
public class XWebinarGraphQLTypeHelper : XBaseGraphQLTypeHelper<XWebinar, Guid>, IXWebinarGraphQLTypeHelper
{
public XWebinarGraphQLTypeHelper(
XDataServiceConfiguration configuration
) : base(configuration)
{ }
public override string GetInQueryCollectionName()
{
return "webinars";
}
public override string GetInQuerySingleName()
{
return "webinar";
}
}
}
+23
View File
@@ -0,0 +1,23 @@
using System;
using GraphQL.Types;
using xDataService.Configuration;
using xDataService.GraphQL;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.GraphQL
{
public class XWebinarGraphQuery : XBaseGraphQLQuery<XWebinar, Guid, XWebinarGraphType, GuidGraphType>
{
public XWebinarGraphQuery(
XDataServiceConfiguration configuration,
IXWebinarRepository repository,
IXWebinarGraphQLTypeHelper helper
) : base(
configuration,
repository,
helper
)
{ }
}
}
+13
View File
@@ -0,0 +1,13 @@
using System;
using GraphQL.Types;
namespace xWebinarService.Providers.GraphQL
{
public class XWebinarGraphSchema : Schema
{
public XWebinarGraphSchema(IServiceProvider services) : base(services)
{
Query = (XWebinarGraphQuery)services.GetService(typeof(XWebinarGraphQuery));
}
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
using xDataService.GraphQL;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.GraphQL
{
public class XWebinarGraphType : XBaseGraphObjectType<XWebinar, Guid>
{
public XWebinarGraphType() : base()
{
Field(x => x.Type);
Field(x => x.Title);
Field(x => x.OwnerId);
Field(x => x.Enabled);
Field(x => x.CreatedOn);
Field(x => x.Description);
}
}
}
@@ -0,0 +1,26 @@
using System;
using xDataService.Configuration;
using xDataService.GraphQL;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.GraphQL
{
public class XWebinarSubscriberGraphQLTypeHelper : XBaseGraphQLTypeHelper<XWebinarSubscriber, int>, IXWebinarSubscriberGraphQLTypeHelper
{
public XWebinarSubscriberGraphQLTypeHelper(
XDataServiceConfiguration configuration
) : base(configuration)
{ }
public override string GetInQueryCollectionName()
{
return "webinarSubscribers";
}
public override string GetInQuerySingleName()
{
return "webinarSubscriber";
}
}
}
@@ -0,0 +1,22 @@
using GraphQL.Types;
using xDataService.Configuration;
using xDataService.GraphQL;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.GraphQL
{
public class XWebinarSubscriberGraphQuery : XBaseGraphQLQuery<XWebinarSubscriber, int, XWebinarSubscriberGraphType, IntGraphType>
{
public XWebinarSubscriberGraphQuery(
XDataServiceConfiguration configuration,
IXWebinarSubscriberRepository repository,
IXWebinarSubscriberGraphQLTypeHelper helper
) : base(
configuration,
repository,
helper
)
{ }
}
}
@@ -0,0 +1,13 @@
using System;
using GraphQL.Types;
namespace xWebinarService.Providers.GraphQL
{
public class XWebinarSubscriberGraphSchema : Schema
{
public XWebinarSubscriberGraphSchema(IServiceProvider services) : base(services)
{
Query = (XWebinarSubscriberGraphQuery)services.GetService(typeof(XWebinarSubscriberGraphQuery));
}
}
}
@@ -0,0 +1,15 @@
using xDataService.GraphQL;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers.GraphQL
{
public class XWebinarSubscriberGraphType : XBaseGraphObjectType<XWebinarSubscriber, int>
{
public XWebinarSubscriberGraphType() : base()
{
Field(x => x.WebinarId);
Field(x => x.SubscribedOn);
Field(x => x.SubscriberId);
}
}
}
@@ -1,23 +0,0 @@
using xCommons.Configurations;
using xStringService.Base;
using xStringService.Interfaces;
using xWebinarService.Interfaces;
namespace xWebinarService.Providers
{
/// <summary>
/// a Servide to Provides Requirements for XWebinar Description Resources ...
/// </summary>
public class XWebinarDescriptionResourceProvider : XBaseStringResourceProvider, IXWebinarDescriptionResourceProvider
{
public XWebinarDescriptionResourceProvider(
IXStringProvider provider,
XAppConfiguration appConfiguration
) : base(
"XWEBD",
provider,
appConfiguration
)
{ }
}
}
+35
View File
@@ -0,0 +1,35 @@
using System;
using Microsoft.EntityFrameworkCore;
using xDataService.Interfaces;
using xDataService.Providers;
using xWebinarService.Configurations.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers
{
public class XWebinarEntityRegisterar : XBaseEntityRegisterar, IXEntityRegisterar
{
public XWebinarEntityRegisterar()
: base(nameof(XWebinarEntityRegisterar))
{
//
// Add Entity ...
AddEntity<XWebinar, Guid>();
}
/// <summary>
/// Configure Entities ...
/// </summary>
/// <param name="modelBuilder"></param>
public override void ConfigureEntities(ModelBuilder modelBuilder)
{
//
// Configure Entity Using Provided ...
modelBuilder
.ApplyConfigurationsFromAssembly(typeof(XWebinarEntityConfiguration).Assembly);
//
base.ConfigureEntities(modelBuilder);
}
}
}
-19
View File
@@ -1,19 +0,0 @@
using System;
using xFileService.Interfaces;
using xFileService.Providers;
using xWebinarService.Interfaces;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers
{
public class XWebinarFileProvider : XBaseFileProvider<Guid>, IXWebinarFileProvider
{
public XWebinarFileProvider(
IXFileProvider fileProvider
) : base(
providedFor: nameof(XWebinar),
fileProvider: fileProvider
)
{ }
}
}
-20
View File
@@ -1,20 +0,0 @@
using System;
using xDataService.Configuration;
using xDataService.InMemRepositories;
using xDataService.Interfaces;
using xWebinarService.Interfaces;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers
{
public class XWebinarGroupStore : XBaseInMemoryRepositoy<XWebinarGroupEntity, Guid>, IXWebinarGroupStore
{
public XWebinarGroupStore(
XDataServiceConfiguration configuration,
IXKeyGenerator<XWebinarGroupEntity, Guid> keyGenerator = null,
IXBaseRepositoryEvents<XWebinarGroupEntity> baseRepositoryEvents = null
) : base(configuration, keyGenerator, baseRepositoryEvents)
{
}
}
}
File diff suppressed because it is too large Load Diff
+25
View File
@@ -0,0 +1,25 @@
using System;
using xDataService.Configuration;
using xDataService.Providers;
using xWebinarService.Interfaces;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers
{
public abstract class XWebinarSeederBase : XBaseDbSeeder<XWebinar, Guid>, IXWebinarSeeder
{
public XWebinarSeederBase(
string entity,
string database,
IXWebinarRepository repository,
XDataServiceConfiguration dataServiceConfiguration
) : base(
entity,
database,
repository,
dataServiceConfiguration
)
{ }
}
}
@@ -0,0 +1,34 @@
using Microsoft.EntityFrameworkCore;
using xDataService.Interfaces;
using xDataService.Providers;
using xWebinarService.Configurations.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers
{
public class XWebinarSubscriberEntityRegisterar : XBaseEntityRegisterar, IXEntityRegisterar
{
public XWebinarSubscriberEntityRegisterar()
: base(nameof(XWebinarSubscriberEntityRegisterar))
{
//
// Add Entity ...
AddEntity<XWebinarSubscriber, int>();
}
/// <summary>
/// Configure Entities ...
/// </summary>
/// <param name="modelBuilder"></param>
public override void ConfigureEntities(ModelBuilder modelBuilder)
{
//
// Configure Entity Using Provided ...
modelBuilder
.ApplyConfigurationsFromAssembly(typeof(XWebinarSubscriberEntityConfiguration).Assembly);
//
base.ConfigureEntities(modelBuilder);
}
}
}
+25
View File
@@ -0,0 +1,25 @@
using System;
using xDataService.Configuration;
using xDataService.Providers;
using xWebinarService.Interfaces;
using xWebinarService.Interfaces.Entities;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers
{
public abstract class XWebinarSubscriberSeederBase : XBaseDbSeeder<XWebinarSubscriber, int>, IXWebinarSubscriberSeeder
{
public XWebinarSubscriberSeederBase(
string entity,
string database,
IXWebinarSubscriberRepository repository,
XDataServiceConfiguration dataServiceConfiguration
) : base(
entity,
database,
repository,
dataServiceConfiguration
)
{ }
}
}
-19
View File
@@ -1,19 +0,0 @@
using System;
using xTagService.Interfaces;
using xTagService.Providers;
using xWebinarService.Interfaces;
using xWebinarService.Models.Entities;
namespace xWebinarService.Providers
{
public class XWebinarTagProvider : XBaseTagProvider<Guid>, IXWebinarTagProvider
{
public XWebinarTagProvider(
IXTagProvider tagProvider
) : base(
providedFor: nameof(XWebinar),
tagProvider: tagProvider
)
{ }
}
}
@@ -1,23 +0,0 @@
using xCommons.Configurations;
using xStringService.Base;
using xStringService.Interfaces;
using xWebinarService.Interfaces;
namespace xWebinarService.Providers
{
/// <summary>
/// a Servide to Provides Requirements for XWebinar Title Resources ...
/// </summary>
public class XWebinarTitleResourceProvider : XBaseStringResourceProvider, IXWebinarTitleResourceProvider
{
public XWebinarTitleResourceProvider(
IXStringProvider provider,
XAppConfiguration appConfiguration
) : base(
"XWEWBT",
provider,
appConfiguration
)
{ }
}
}