Cleanup unnecessary classes and add only Provider Controllers ...
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xIdentityService.Interfaces;
|
||||
using xPushService.Controllers;
|
||||
using xPushService.Interfaces;
|
||||
using xServices.Interfaces;
|
||||
using xServices.Models.Dtos;
|
||||
using xServices.Models.Entities;
|
||||
using xServices.Providers;
|
||||
|
||||
namespace xServices.Controllers
|
||||
namespace xServices.Base
|
||||
{
|
||||
[AllowAnonymous]
|
||||
public class XTestServiceProviderController : XBaseServiceProviderController<XTest, XTestDto, Guid, XTestDtoHub>, IXBaseServiceProviderController<XTest, XTestDto, Guid, XTestDtoHub>
|
||||
/// <summary>
|
||||
/// an Abstract Implementation of Provided Actions for XTest ...
|
||||
/// </summary>
|
||||
public abstract class XTestProviderControllerBase : XBaseProvidedController<XTest, XTestDto, Guid, XTestDtoHub>, IXTestProviderController
|
||||
{
|
||||
public XTestServiceProviderController(
|
||||
ILogger<XTestServiceProviderController> logger,
|
||||
protected XTestProviderControllerBase(
|
||||
ILogger<XTestProviderControllerBase> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
IXIdentityProvider identityProvider,
|
||||
XValidationProvider validationProvider,
|
||||
IXTestServiceProvider provider,
|
||||
IXTestProvider provider,
|
||||
Func<IQueryable<XTest>, IOrderedQueryable<XTest>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XTest>, IIncludableQueryable<XTest, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
@@ -1,32 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xFileService.Controllers;
|
||||
using xFileService.Interfaces.Entities;
|
||||
using xFileService.Models.Entities;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
public class XFileRepositoryController : XFileRepositoryControllerBase
|
||||
{
|
||||
public XFileRepositoryController(
|
||||
ILogger<XFileRepositoryController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
XValidationProvider validationProvider,
|
||||
IXFileRepository repository,
|
||||
Func<IQueryable<XFile>, IOrderedQueryable<XFile>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XFile>, IIncludableQueryable<XFile, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
validationProvider,
|
||||
repository,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xIdentityService.Interfaces;
|
||||
using xFileService.Controllers;
|
||||
using xFileService.Interfaces.Entities;
|
||||
using xFileService.Models.Entities;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
public class XFileRepositoryProviderController : XFileRepositoryProviderControllerBase
|
||||
{
|
||||
public XFileRepositoryProviderController(
|
||||
ILogger<XFileRepositoryProviderController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
IXIdentityProvider identityProvider,
|
||||
XValidationProvider validationProvider,
|
||||
IXFileRepositoryProvider provider,
|
||||
Func<IQueryable<XFile>, IOrderedQueryable<XFile>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XFile>, IIncludableQueryable<XFile, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
identityProvider,
|
||||
validationProvider,
|
||||
provider,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xFileService.Controllers;
|
||||
using xFileService.Interfaces.Dtos;
|
||||
using xFileService.Models.Entities;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
public class XFileServiceController : XFileServiceControllerBase
|
||||
{
|
||||
public XFileServiceController(
|
||||
ILogger<XFileServiceController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
XValidationProvider validationProvider,
|
||||
IXFileRepositoryService repositoryService,
|
||||
Func<IQueryable<XFile>, IOrderedQueryable<XFile>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XFile>, IIncludableQueryable<XFile, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
validationProvider,
|
||||
repositoryService,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xIdentityService.Interfaces;
|
||||
using xFileService.Controllers;
|
||||
using xFileService.Interfaces.Dtos;
|
||||
using xFileService.Models.Entities;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
public class XFileServiceProviderController : XFileServiceProviderControllerBase
|
||||
{
|
||||
public XFileServiceProviderController(
|
||||
ILogger<XFileServiceProviderController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
IXIdentityProvider identityProvider,
|
||||
XValidationProvider validationProvider,
|
||||
IXFileServiceProvider provider,
|
||||
Func<IQueryable<XFile>, IOrderedQueryable<XFile>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XFile>, IIncludableQueryable<XFile, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
identityProvider,
|
||||
validationProvider,
|
||||
provider,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -6,19 +6,19 @@ using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xIdentityService.Interfaces;
|
||||
using xStringService.Controllers;
|
||||
using xStringService.Interfaces.Dtos;
|
||||
using xStringService.Interfaces;
|
||||
using xStringService.Models.Entities;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
public class XStringServiceProviderController : XStringServiceProviderControllerBase
|
||||
public class XStringProviderController : XStringProviderControllerBase, IXStringProviderController
|
||||
{
|
||||
public XStringServiceProviderController(
|
||||
ILogger<XStringServiceProviderController> logger,
|
||||
public XStringProviderController(
|
||||
ILogger<XStringProviderController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
IXIdentityProvider identityProvider,
|
||||
XValidationProvider validationProvider,
|
||||
IXStringServiceProvider provider,
|
||||
IXStringProvider provider,
|
||||
Func<IQueryable<XString>, IOrderedQueryable<XString>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XString>, IIncludableQueryable<XString, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
@@ -1,32 +0,0 @@
|
||||
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
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
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
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
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
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -6,19 +6,19 @@ using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xIdentityService.Interfaces;
|
||||
using xTagService.Controllers;
|
||||
using xTagService.Interfaces.Dtos;
|
||||
using xTagService.Interfaces;
|
||||
using xTagService.Models.Entities;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
public class XTagServiceProviderController : XTagServiceProviderControllerBase
|
||||
public class XTagProviderController : XTagProviderControllerBase, IXTagProviderController
|
||||
{
|
||||
public XTagServiceProviderController(
|
||||
ILogger<XTagServiceProviderController> logger,
|
||||
public XTagProviderController(
|
||||
ILogger<XTagProviderController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
IXIdentityProvider identityProvider,
|
||||
XValidationProvider validationProvider,
|
||||
IXTagServiceProvider provider,
|
||||
IXTagProvider provider,
|
||||
Func<IQueryable<XTag>, IOrderedQueryable<XTag>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XTag>, IIncludableQueryable<XTag, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
@@ -1,32 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xTagService.Controllers;
|
||||
using xTagService.Interfaces.Entities;
|
||||
using xTagService.Models.Entities;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
public class XTagRepositoryController : XTagRepositoryControllerBase
|
||||
{
|
||||
public XTagRepositoryController(
|
||||
ILogger<XTagRepositoryController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
XValidationProvider validationProvider,
|
||||
IXTagRepository repository,
|
||||
Func<IQueryable<XTag>, IOrderedQueryable<XTag>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XTag>, IIncludableQueryable<XTag, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
validationProvider,
|
||||
repository,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xIdentityService.Interfaces;
|
||||
using xTagService.Controllers;
|
||||
using xTagService.Interfaces.Entities;
|
||||
using xTagService.Models.Entities;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
public class XTagRepositoryProviderController : XTagRepositoryProviderControllerBase
|
||||
{
|
||||
public XTagRepositoryProviderController(
|
||||
ILogger<XTagRepositoryProviderController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
IXIdentityProvider identityProvider,
|
||||
XValidationProvider validationProvider,
|
||||
IXTagRepositoryProvider provider,
|
||||
Func<IQueryable<XTag>, IOrderedQueryable<XTag>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XTag>, IIncludableQueryable<XTag, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
identityProvider,
|
||||
validationProvider,
|
||||
provider,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xTagService.Controllers;
|
||||
using xTagService.Interfaces.Dtos;
|
||||
using xTagService.Models.Entities;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
public class XTagServiceController : XTagServiceControllerBase
|
||||
{
|
||||
public XTagServiceController(
|
||||
ILogger<XTagServiceController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
XValidationProvider validationProvider,
|
||||
IXTagRepositoryService repositoryService,
|
||||
Func<IQueryable<XTag>, IOrderedQueryable<XTag>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XTag>, IIncludableQueryable<XTag, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
validationProvider,
|
||||
repositoryService,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
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
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xIdentityService.Interfaces;
|
||||
using xTermsAndConditionsService.Controllers;
|
||||
using xTermsAndConditionsService.Interfaces;
|
||||
using xTermsAndConditionsService.Providers;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
public class XTermsAndConditionsProviderController : XTermsAndConditionsControllerBase, IXTermsAndConditionsController
|
||||
{
|
||||
public XTermsAndConditionsProviderController(
|
||||
ILogger<XTermsAndConditionsProviderController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
IXIdentityProvider identityProvider,
|
||||
XValidationProvider validationProvider,
|
||||
IXTermsAndConditionsProvider provider
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
identityProvider,
|
||||
validationProvider,
|
||||
provider
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -1,32 +1,32 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xDataService.Controllers;
|
||||
using xDataService.Interfaces;
|
||||
using xIdentityService.Interfaces;
|
||||
using xServices.Base;
|
||||
using xServices.Interfaces;
|
||||
using xServices.Models.Entities;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
[AllowAnonymous]
|
||||
public partial class XTestRepositoryController : XBaseRepositoryController<XTest, Guid>, IXBaseRepositoryController<XTest, Guid>
|
||||
public class XTestProviderController : XTestProviderControllerBase, IXTestProviderController
|
||||
{
|
||||
public XTestRepositoryController(
|
||||
ILogger<XTestRepositoryController> logger,
|
||||
public XTestProviderController(
|
||||
ILogger<XTestProviderController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
IXIdentityProvider identityProvider,
|
||||
XValidationProvider validationProvider,
|
||||
IXTestRepository repository,
|
||||
IXTestProvider provider,
|
||||
Func<IQueryable<XTest>, IOrderedQueryable<XTest>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XTest>, IIncludableQueryable<XTest, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
identityProvider,
|
||||
validationProvider,
|
||||
repository,
|
||||
provider,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
@@ -1,39 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xIdentityService.Interfaces;
|
||||
using xPushService.Controllers;
|
||||
using xPushService.Interfaces;
|
||||
using xServices.Interfaces;
|
||||
using xServices.Models.Entities;
|
||||
using xServices.Providers;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
[AllowAnonymous]
|
||||
public class XTestRepositoryProviderController : XBaseRepositoryProviderController<XTest, Guid, XTestEntityHub>, IXBaseRepositoryProviderController<XTest, Guid, XTestEntityHub>
|
||||
{
|
||||
public XTestRepositoryProviderController(
|
||||
ILogger<XTestRepositoryProviderController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
IXIdentityProvider identityProvider,
|
||||
XValidationProvider validationProvider,
|
||||
IXTestRepositoryProvider provider,
|
||||
Func<IQueryable<XTest>, IOrderedQueryable<XTest>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XTest>, IIncludableQueryable<XTest, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
identityProvider,
|
||||
validationProvider,
|
||||
provider,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xDataService.Controllers;
|
||||
using xDataService.Interfaces;
|
||||
using xServices.Interfaces;
|
||||
using xServices.Models.Dtos;
|
||||
using xServices.Models.Entities;
|
||||
|
||||
namespace xServices.Controllers
|
||||
{
|
||||
[AllowAnonymous]
|
||||
public class XTestServiceController : XBaseServiceController<XTest, XTestDto, Guid>, IXBaseServiceController<XTest, XTestDto, Guid>
|
||||
{
|
||||
public XTestServiceController(
|
||||
ILogger<XTestServiceController> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
XValidationProvider validationProvider,
|
||||
IXTestRepositoryService repositoryService,
|
||||
Func<IQueryable<XTest>, IOrderedQueryable<XTest>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XTest>, IIncludableQueryable<XTest, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
validationProvider,
|
||||
repositoryService,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -271,6 +271,7 @@ namespace xServices.DI
|
||||
|
||||
//
|
||||
// Register Repository Services ...
|
||||
services.AddScoped<IXTestProvider, XTestProvider>();
|
||||
services.AddScoped<IXTestRepositoryService, XTestRepositoryService>();
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using xPushService.Interfaces;
|
||||
using xServices.Models.Dtos;
|
||||
using xServices.Models.Entities;
|
||||
using xServices.Providers;
|
||||
|
||||
namespace xServices.Interfaces
|
||||
{
|
||||
public interface IXTestProvider : IXBaseProvided<XTest, XTestDto, Guid, XTestDtoHub>
|
||||
{}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using xPushService.Interfaces;
|
||||
using xServices.Models.Dtos;
|
||||
using xServices.Models.Entities;
|
||||
using xServices.Providers;
|
||||
|
||||
namespace xServices.Interfaces
|
||||
{
|
||||
public interface IXTestProviderController : IXBaseProvidedController<XTest, XTestDto, Guid, XTestDtoHub>
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using xCommons.Extensions;
|
||||
using xIdentityModels.Models;
|
||||
using xPushService.Providers;
|
||||
using xServices.Interfaces;
|
||||
using xServices.Models.Dtos;
|
||||
using xServices.Models.Entities;
|
||||
|
||||
namespace xServices.Providers
|
||||
{
|
||||
public class XTestProvider : XBaseProvided<XTest, XTestDto, Guid, XTestDtoHub>, IXTestProvider
|
||||
{
|
||||
public XTestProvider(
|
||||
IXTestServiceProvider provider
|
||||
) : base(
|
||||
provider,
|
||||
permittedRoles: new string[] { }
|
||||
)
|
||||
{ }
|
||||
|
||||
public override bool IsOwned(
|
||||
XTestDto item,
|
||||
XUserClaimsInfoDto userInfo
|
||||
)
|
||||
{
|
||||
return !item.IsNullOrDefault();
|
||||
}
|
||||
|
||||
public override bool IsOwned(
|
||||
XTest item,
|
||||
XUserClaimsInfoDto userInfo
|
||||
)
|
||||
{
|
||||
return item.IsNullOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user