last ...
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCategoryService.Interfaces.Entities;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xDataService.Controllers;
|
||||
using xDataService.Interfaces;
|
||||
|
||||
namespace xCategoryService.Controllers
|
||||
{
|
||||
public abstract class XCategoryRepositoryControllerBase : XBaseRepositoryController<XCategory, int>, IXBaseRepositoryController<XCategory, int>
|
||||
{
|
||||
protected XCategoryRepositoryControllerBase(
|
||||
ILogger<XCategoryRepositoryControllerBase> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
XValidationProvider validationProvider,
|
||||
IXCategoryRepository repository,
|
||||
Func<IQueryable<XCategory>, IOrderedQueryable<XCategory>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XCategory>, IIncludableQueryable<XCategory, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
validationProvider,
|
||||
repository,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCategoryService.Interfaces.Entities;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCategoryService.Providers.Entities;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xIdentityService.Interfaces;
|
||||
using xPushService.Controllers;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xCategoryService.Controllers
|
||||
{
|
||||
public abstract class XCategoryRepositoryProviderControllerBase : XBaseRepositoryProviderController<XCategory, int, XCategoryEntityHub>, IXBaseRepositoryProviderController<XCategory, int, XCategoryEntityHub>
|
||||
{
|
||||
protected XCategoryRepositoryProviderControllerBase(
|
||||
ILogger<XCategoryRepositoryProviderControllerBase> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
IXIdentityProvider identityProvider,
|
||||
XValidationProvider validationProvider,
|
||||
IXCategoryRepositoryProvider provider,
|
||||
Func<IQueryable<XCategory>, IOrderedQueryable<XCategory>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XCategory>, IIncludableQueryable<XCategory, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
identityProvider,
|
||||
validationProvider,
|
||||
provider,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCategoryService.Interfaces.Dtos;
|
||||
using xCategoryService.Models.Dtos;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xDataService.Controllers;
|
||||
using xDataService.Interfaces;
|
||||
|
||||
namespace xCategoryService.Controllers
|
||||
{
|
||||
public abstract class XCategoryServiceControllerBase : XBaseServiceController<XCategory, XCategoryDto, int>, IXBaseServiceController<XCategory, XCategoryDto, int>
|
||||
{
|
||||
protected XCategoryServiceControllerBase(
|
||||
ILogger<XCategoryServiceControllerBase> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
XValidationProvider validationProvider,
|
||||
IXCategoryRepositoryService repositoryService,
|
||||
Func<IQueryable<XCategory>, IOrderedQueryable<XCategory>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XCategory>, IIncludableQueryable<XCategory, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
validationProvider,
|
||||
repositoryService,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using xCategoryService.Interfaces.Dtos;
|
||||
using xCategoryService.Models.Dtos;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCategoryService.Providers.Dtos;
|
||||
using xCommons.Configurations;
|
||||
using xCommons.Providers;
|
||||
using xIdentityService.Interfaces;
|
||||
using xPushService.Controllers;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xCategoryService.Controllers
|
||||
{
|
||||
public abstract class XCategoryServiceProviderControllerBase : XBaseServiceProviderController<XCategory, XCategoryDto, int, XCategoryDtoHub>, IXBaseServiceProviderController<XCategory, XCategoryDto, int, XCategoryDtoHub>
|
||||
{
|
||||
protected XCategoryServiceProviderControllerBase(
|
||||
ILogger<XCategoryServiceProviderControllerBase> logger,
|
||||
XAppConfiguration appConfiguration,
|
||||
IXIdentityProvider identityProvider,
|
||||
XValidationProvider validationProvider,
|
||||
IXCategoryServiceProvider provider,
|
||||
Func<IQueryable<XCategory>, IOrderedQueryable<XCategory>> defaultOrderBuilder = null,
|
||||
Func<IQueryable<XCategory>, IIncludableQueryable<XCategory, object>> defaultIncludeBuilder = null
|
||||
) : base(
|
||||
logger,
|
||||
appConfiguration,
|
||||
identityProvider,
|
||||
validationProvider,
|
||||
provider,
|
||||
defaultOrderBuilder,
|
||||
defaultIncludeBuilder
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using xCategoryService.Models.Dtos;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCategoryService.Providers.Dtos;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xCategoryService.Interfaces
|
||||
{
|
||||
public interface IXCategoryProvider : IXBaseProvided<XCategory, XCategoryDto, int, XCategoryDtoHub>
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using xCategoryService.Models.Dtos;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCategoryService.Providers.Dtos;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xCategoryService.Interfaces
|
||||
{
|
||||
public interface IXCategoryProviderController: IXBaseProvidedController<XCategory, XCategoryDto, int, XCategoryDtoHub>
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using xCategoryService.Models.Dtos;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCategoryService.Providers.Dtos;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xCategoryService.Interfaces
|
||||
{
|
||||
public interface IXSubCategoryProvider : IXBaseProvided<XSubCategory, XSubCategoryDto, int, XSubCategoryDtoHub>
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using xCategoryService.Models.Dtos;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCategoryService.Providers.Dtos;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xCategoryService.Interfaces
|
||||
{
|
||||
public interface IXSubCategoryProviderController: IXBaseProvidedController<XSubCategory, XSubCategoryDto, int, XSubCategoryDtoHub>
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using xCategoryService.Interfaces;
|
||||
using xCategoryService.Interfaces.Dtos;
|
||||
using xCategoryService.Models.Dtos;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCategoryService.Providers.Dtos;
|
||||
using xCommons.Extensions;
|
||||
using xIdentityModels.Models;
|
||||
using xPushService.Providers;
|
||||
|
||||
namespace xCategoryService.Providers
|
||||
{
|
||||
public class XCategoryProvider : XBaseProvided<XCategory, XCategoryDto, int, XCategoryDtoHub>, IXCategoryProvider
|
||||
{
|
||||
public XCategoryProvider(
|
||||
IXCategoryServiceProvider provider
|
||||
) : base(
|
||||
provider,
|
||||
permittedRoles: new string[] { }
|
||||
)
|
||||
{ }
|
||||
|
||||
public override bool IsOwned(
|
||||
XCategoryDto item,
|
||||
XUserClaimsInfoDto userInfo
|
||||
)
|
||||
{
|
||||
return !item.IsNullOrDefault();
|
||||
}
|
||||
|
||||
public override bool IsOwned(
|
||||
XCategory item,
|
||||
XUserClaimsInfoDto userInfo
|
||||
)
|
||||
{
|
||||
return !item.IsNullOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using xCategoryService.Interfaces;
|
||||
using xCategoryService.Interfaces.Dtos;
|
||||
using xCategoryService.Models.Dtos;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCategoryService.Providers.Dtos;
|
||||
using xCommons.Extensions;
|
||||
using xIdentityModels.Models;
|
||||
using xPushService.Providers;
|
||||
|
||||
namespace xCategoryService.Providers
|
||||
{
|
||||
public class XSubCategoryProvider : XBaseProvided<XSubCategory, XSubCategoryDto, int, XSubCategoryDtoHub>, IXSubCategoryProvider
|
||||
{
|
||||
public XSubCategoryProvider(
|
||||
IXSubCategoryServiceProvider provider
|
||||
) : base(
|
||||
provider,
|
||||
permittedRoles: new string[] { }
|
||||
)
|
||||
{ }
|
||||
|
||||
public override bool IsOwned(
|
||||
XSubCategoryDto item,
|
||||
XUserClaimsInfoDto userInfo
|
||||
)
|
||||
{
|
||||
return !item.IsNullOrDefault();
|
||||
}
|
||||
|
||||
public override bool IsOwned(
|
||||
XSubCategory item,
|
||||
XUserClaimsInfoDto userInfo
|
||||
)
|
||||
{
|
||||
return !item.IsNullOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user