last ...
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
namespace xServices.Constants
|
namespace xServices.Constants
|
||||||
{
|
{
|
||||||
public struct ConfigurationNodeNames
|
public partial struct ConfigurationNodeNames
|
||||||
{
|
{
|
||||||
public const string SERVICES_NODE = "ServicesConfiguration";
|
public const string SERVICES_NODE = "ServicesConfiguration";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using Microsoft.EntityFrameworkCore.Query;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using xCommons.Configurations;
|
||||||
|
using xCommons.Providers;
|
||||||
|
using xStringService.Controllers;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
using xStringService.Models.Entities;
|
||||||
|
|
||||||
|
namespace xServices.Controllers
|
||||||
|
{
|
||||||
|
public class XStringRepositoryController : XStringRepositoryControllerBase
|
||||||
|
{
|
||||||
|
public XStringRepositoryController(
|
||||||
|
ILogger<XStringRepositoryController> logger,
|
||||||
|
XAppConfiguration appConfiguration,
|
||||||
|
XValidationProvider validationProvider,
|
||||||
|
IXStringRepository repository,
|
||||||
|
Func<IQueryable<XString>, IOrderedQueryable<XString>> defaultOrderBuilder = null,
|
||||||
|
Func<IQueryable<XString>, IIncludableQueryable<XString, object>> defaultIncludeBuilder = null
|
||||||
|
) : base(
|
||||||
|
logger,
|
||||||
|
appConfiguration,
|
||||||
|
validationProvider,
|
||||||
|
repository,
|
||||||
|
defaultOrderBuilder,
|
||||||
|
defaultIncludeBuilder
|
||||||
|
)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using Microsoft.EntityFrameworkCore.Query;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using xCommons.Configurations;
|
||||||
|
using xCommons.Providers;
|
||||||
|
using xIdentityService.Interfaces;
|
||||||
|
using xStringService.Controllers;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
using xStringService.Models.Entities;
|
||||||
|
|
||||||
|
namespace xServices.Controllers
|
||||||
|
{
|
||||||
|
public class XStringRepositoryProviderController : XStringRepositoryProviderControllerBase
|
||||||
|
{
|
||||||
|
public XStringRepositoryProviderController(
|
||||||
|
ILogger<XStringRepositoryProviderController> logger,
|
||||||
|
XAppConfiguration appConfiguration,
|
||||||
|
IXIdentityProvider identityProvider,
|
||||||
|
XValidationProvider validationProvider,
|
||||||
|
IXStringRepositoryProvider provider,
|
||||||
|
Func<IQueryable<XString>, IOrderedQueryable<XString>> defaultOrderBuilder = null,
|
||||||
|
Func<IQueryable<XString>, IIncludableQueryable<XString, object>> defaultIncludeBuilder = null
|
||||||
|
) : base(
|
||||||
|
logger,
|
||||||
|
appConfiguration,
|
||||||
|
identityProvider,
|
||||||
|
validationProvider,
|
||||||
|
provider,
|
||||||
|
defaultOrderBuilder,
|
||||||
|
defaultIncludeBuilder
|
||||||
|
)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using Microsoft.EntityFrameworkCore.Query;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using xCommons.Configurations;
|
||||||
|
using xCommons.Providers;
|
||||||
|
using xStringService.Controllers;
|
||||||
|
using xStringService.Interfaces.Dtos;
|
||||||
|
using xStringService.Models.Entities;
|
||||||
|
|
||||||
|
namespace xServices.Controllers
|
||||||
|
{
|
||||||
|
public class XStringServiceController : XStringServiceControllerBase
|
||||||
|
{
|
||||||
|
public XStringServiceController(
|
||||||
|
ILogger<XStringServiceController> logger,
|
||||||
|
XAppConfiguration appConfiguration,
|
||||||
|
XValidationProvider validationProvider,
|
||||||
|
IXStringRepositoryService repositoryService,
|
||||||
|
Func<IQueryable<XString>, IOrderedQueryable<XString>> defaultOrderBuilder = null,
|
||||||
|
Func<IQueryable<XString>, IIncludableQueryable<XString, object>> defaultIncludeBuilder = null
|
||||||
|
) : base(
|
||||||
|
logger,
|
||||||
|
appConfiguration,
|
||||||
|
validationProvider,
|
||||||
|
repositoryService,
|
||||||
|
defaultOrderBuilder,
|
||||||
|
defaultIncludeBuilder
|
||||||
|
)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using Microsoft.EntityFrameworkCore.Query;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using xCommons.Configurations;
|
||||||
|
using xCommons.Providers;
|
||||||
|
using xIdentityService.Interfaces;
|
||||||
|
using xStringService.Controllers;
|
||||||
|
using xStringService.Interfaces.Dtos;
|
||||||
|
using xStringService.Models.Entities;
|
||||||
|
|
||||||
|
namespace xServices.Controllers
|
||||||
|
{
|
||||||
|
public class XStringServiceProviderController : XStringServiceProviderControllerBase
|
||||||
|
{
|
||||||
|
public XStringServiceProviderController(
|
||||||
|
ILogger<XStringServiceProviderController> logger,
|
||||||
|
XAppConfiguration appConfiguration,
|
||||||
|
IXIdentityProvider identityProvider,
|
||||||
|
XValidationProvider validationProvider,
|
||||||
|
IXStringServiceProvider provider,
|
||||||
|
Func<IQueryable<XString>, IOrderedQueryable<XString>> defaultOrderBuilder = null,
|
||||||
|
Func<IQueryable<XString>, IIncludableQueryable<XString, object>> defaultIncludeBuilder = null
|
||||||
|
) : base(
|
||||||
|
logger,
|
||||||
|
appConfiguration,
|
||||||
|
identityProvider,
|
||||||
|
validationProvider,
|
||||||
|
provider,
|
||||||
|
defaultOrderBuilder,
|
||||||
|
defaultIncludeBuilder
|
||||||
|
)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using xCommons.Configurations;
|
||||||
|
using xCommons.Providers;
|
||||||
|
using xIdentityService.Interfaces;
|
||||||
|
using xTermsAndConditionsService.Controllers;
|
||||||
|
using xTermsAndConditionsService.Interfaces;
|
||||||
|
|
||||||
|
namespace xServices.Controllers
|
||||||
|
{
|
||||||
|
public class XTermsAndConditionsController : XTermsAndComditionsControllerBase, IXTermsAndComditionsController
|
||||||
|
{
|
||||||
|
public XTermsAndConditionsController(
|
||||||
|
ILogger<XTermsAndConditionsController> logger,
|
||||||
|
XAppConfiguration appConfiguration,
|
||||||
|
IXIdentityProvider identityProvider,
|
||||||
|
IXTermsAndComditionsProvider provider,
|
||||||
|
XValidationProvider validationProvider
|
||||||
|
) : base(
|
||||||
|
logger,
|
||||||
|
appConfiguration,
|
||||||
|
identityProvider,
|
||||||
|
provider,
|
||||||
|
validationProvider
|
||||||
|
)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,6 +17,7 @@ using xServices.Interfaces;
|
|||||||
using xServices.Providers;
|
using xServices.Providers;
|
||||||
using xStorageService.DI;
|
using xStorageService.DI;
|
||||||
using xStringService.DI;
|
using xStringService.DI;
|
||||||
|
using xTermsAndConditionsService.DI;
|
||||||
|
|
||||||
namespace xServices.DI
|
namespace xServices.DI
|
||||||
{
|
{
|
||||||
@@ -187,6 +188,10 @@ namespace xServices.DI
|
|||||||
app.UseXStringService(
|
app.UseXStringService(
|
||||||
isDevelopmentEnvironment: isDevelopmentEnvironment
|
isDevelopmentEnvironment: isDevelopmentEnvironment
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Using Terms and Conditions Service ...
|
||||||
|
app.UseXTermsAndConditionsService();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -274,11 +279,18 @@ namespace xServices.DI
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//
|
//
|
||||||
// String Service ...
|
// Register String Service ...
|
||||||
services.AddXStringService<XApiDbContext>(
|
services.AddXStringService<XApiDbContext>(
|
||||||
lifeTime: lifeTime,
|
lifeTime: lifeTime,
|
||||||
repositoryType: xDataService.Constants.XRepositoryType.EF
|
repositoryType: xDataService.Constants.XRepositoryType.EF
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Register Terms and Conditions Service ...
|
||||||
|
services.AddXTermsConditionsService(
|
||||||
|
lifeTime: lifeTime,
|
||||||
|
configuration: configuration
|
||||||
|
);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ namespace xServices.Databases
|
|||||||
IXTestRepository,
|
IXTestRepository,
|
||||||
XTestEFRepository,
|
XTestEFRepository,
|
||||||
XApiDbContext,
|
XApiDbContext,
|
||||||
IXTestDbSeeder,
|
IXTestSeeder,
|
||||||
XTestDbSeeder
|
XTestSeeder
|
||||||
>
|
>
|
||||||
{}
|
{}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using xDataService.Configuration;
|
using xDataService.Configuration;
|
||||||
using xDataService.Db;
|
using xDataService.Db;
|
||||||
|
using xDataService.Providers;
|
||||||
using xServices.Models.Entities;
|
using xServices.Models.Entities;
|
||||||
|
using xStringService.Providers;
|
||||||
|
// using xStringService.Models.Entities;
|
||||||
|
|
||||||
namespace xServices.Databases
|
namespace xServices.Databases
|
||||||
{
|
{
|
||||||
@@ -18,8 +21,16 @@ namespace xServices.Databases
|
|||||||
|
|
||||||
public XApiDbContext(
|
public XApiDbContext(
|
||||||
DbContextOptions options,
|
DbContextOptions options,
|
||||||
XDataServiceConfiguration config
|
XDataServiceConfiguration config,
|
||||||
) : base(options, config) { }
|
XEntityRegisterarHandlerService dynamicEntityHandlers
|
||||||
|
) : base(
|
||||||
|
"xApiDb",
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
dynamicEntityHandlers,
|
||||||
|
new string[] { nameof(XStringEntityRegisterar) }
|
||||||
|
)
|
||||||
|
{ }
|
||||||
|
|
||||||
//
|
//
|
||||||
public override void OnXModelCreating(ModelBuilder modelBuilder)
|
public override void OnXModelCreating(ModelBuilder modelBuilder)
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ using xServices.Models.Entities;
|
|||||||
|
|
||||||
namespace xServices.Interfaces
|
namespace xServices.Interfaces
|
||||||
{
|
{
|
||||||
public interface IXTestDbSeeder : IXBaseDbSeeder<XTest, Guid>
|
public interface IXTestSeeder : IXBaseDbSeeder<XTest, Guid>
|
||||||
{ }
|
{ }
|
||||||
}
|
}
|
||||||
@@ -6,9 +6,9 @@ using xServices.Models.Entities;
|
|||||||
|
|
||||||
namespace xServices.Providers
|
namespace xServices.Providers
|
||||||
{
|
{
|
||||||
public class XTestDbSeeder : XBaseDbSeeder<XTest, Guid>, IXTestDbSeeder
|
public class XTestSeeder : XBaseDbSeeder<XTest, Guid>, IXTestSeeder
|
||||||
{
|
{
|
||||||
public XTestDbSeeder(
|
public XTestSeeder(
|
||||||
IXTestRepository repository,
|
IXTestRepository repository,
|
||||||
XDataServiceConfiguration dataServiceConfiguration
|
XDataServiceConfiguration dataServiceConfiguration
|
||||||
) : base(
|
) : base(
|
||||||
@@ -38,5 +38,6 @@
|
|||||||
<ProjectReference Include="..\xIdentityHelper\xIdentityHelper.csproj" />
|
<ProjectReference Include="..\xIdentityHelper\xIdentityHelper.csproj" />
|
||||||
<ProjectReference Include="..\xMessageService\xMessageService.csproj" />
|
<ProjectReference Include="..\xMessageService\xMessageService.csproj" />
|
||||||
<ProjectReference Include="..\xStorageService\xStorageService.csproj" />
|
<ProjectReference Include="..\xStorageService\xStorageService.csproj" />
|
||||||
|
<ProjectReference Include="..\xTermsAndConditionsService\xTermsAndConditionsService.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user