Complete Category and SubCategory Base Actions, and also ControllersBase and their Implemented Usages ...
This commit is contained in:
@@ -43,14 +43,14 @@ namespace xCategoryService.Interfaces
|
||||
/// Add Category Item for Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="langauge"></param>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XCategoryResourceDto> Add(
|
||||
XCategoryDto item,
|
||||
string langauge = null,
|
||||
string language = null,
|
||||
string connectionId = null,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
CancellationToken cancellationToken = default
|
||||
@@ -76,14 +76,14 @@ namespace xCategoryService.Interfaces
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Referesh a Resource ...
|
||||
/// Refresh a Resource ...
|
||||
/// </summary>
|
||||
/// <param name="resource"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XCategoryResourceDto> Referesh(
|
||||
Task<XCategoryResourceDto> Refresh(
|
||||
XCategoryResourceDto resource,
|
||||
string connectionId = null,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
@@ -105,7 +105,7 @@ namespace xCategoryService.Interfaces
|
||||
/// <param name="predicate"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XCategoryResourceDto> FindOne(
|
||||
Task<XCategoryResourceDto> FindOneResource(
|
||||
Expression<Func<XCategoryResourceDto, bool>> predicate = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
@@ -116,7 +116,7 @@ namespace xCategoryService.Interfaces
|
||||
/// <param name="predicate"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<XCategoryResourceDto>> FindMany(
|
||||
Task<IEnumerable<XCategoryResourceDto>> FindManyResource(
|
||||
Expression<Func<XCategoryResourceDto, bool>> predicate = null,
|
||||
Func<IQueryable<XCategoryResourceDto>, IOrderedQueryable<XCategoryResourceDto>> orderBuilder = null,
|
||||
CancellationToken cancellationToken = default
|
||||
|
||||
@@ -1,10 +1,129 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xCategoryService.Models.Dtos;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCategoryService.Providers.Dtos;
|
||||
using xModels.Dtos;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xCategoryService.Interfaces
|
||||
{
|
||||
public interface IXCategoryProviderController: IXBaseProvidedController<XCategory, XCategoryDto, int, XCategoryDtoHub>
|
||||
{ }
|
||||
public interface IXCategoryProviderController : IXBaseProvidedController<XCategory, XCategoryDto, int, XCategoryDtoHub>
|
||||
{
|
||||
/// <summary>
|
||||
/// Check Has Specified Locale or not ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/{id}/HasLocale")]
|
||||
Task<ActionResult<bool>> HasLocale(
|
||||
[FromRoute] int id,
|
||||
[FromQuery] string language,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Load an Item by all of it's Related Translations ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/{id}")]
|
||||
Task<ActionResult<XCategoryResourceDto>> GetResource(
|
||||
[FromRoute] int id,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Add Category Item for Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("Resources")]
|
||||
Task<ActionResult<XCategoryResourceDto>> Add(
|
||||
[FromBody] XCategoryDto item,
|
||||
[FromQuery] string language = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Update a Category Item for Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("Resources/{id}")]
|
||||
Task<ActionResult<XCategoryResourceDto>> Update(
|
||||
[FromRoute] int id,
|
||||
[FromBody] XCategoryDto item,
|
||||
[FromQuery] string language = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Refresh a Resource ...
|
||||
/// </summary>
|
||||
/// <param name="resource"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("Resources/Refresh")]
|
||||
Task<ActionResult<XCategoryResourceDto>> Refresh(
|
||||
[FromBody] XCategoryResourceDto resource,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Get All Resources ...
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/All")]
|
||||
Task<ActionResult<IEnumerable<XCategoryResourceDto>>> GetAllResources(
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Find One Resource ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/Find/One")]
|
||||
Task<ActionResult<XCategoryResourceDto>> FindOneResource(
|
||||
[FromQuery] string query,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Find Many Resource ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/Find/Many")]
|
||||
Task<ActionResult<IEnumerable<XCategoryResourceDto>>> FindManyResource(
|
||||
[FromQuery] string query,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve Resources by Query Pattern ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/Query")]
|
||||
Task<ActionResult<XQueryResult<XCategoryResourceDto>>> QueryResources(
|
||||
[FromQuery] XQuery query = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -43,14 +43,14 @@ namespace xCategoryService.Interfaces
|
||||
/// Add Category Item for Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="langauge"></param>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XSubCategoryResourceDto> Add(
|
||||
XSubCategoryDto item,
|
||||
string langauge = null,
|
||||
string language = null,
|
||||
string connectionId = null,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
CancellationToken cancellationToken = default
|
||||
@@ -76,14 +76,14 @@ namespace xCategoryService.Interfaces
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Referesh a Resource ...
|
||||
/// Refresh a Resource ...
|
||||
/// </summary>
|
||||
/// <param name="resource"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XSubCategoryResourceDto> Referesh(
|
||||
Task<XSubCategoryResourceDto> Refresh(
|
||||
XSubCategoryResourceDto resource,
|
||||
string connectionId = null,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
@@ -105,7 +105,7 @@ namespace xCategoryService.Interfaces
|
||||
/// <param name="predicate"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XSubCategoryResourceDto> FindOne(
|
||||
Task<XSubCategoryResourceDto> FindOneResource(
|
||||
Expression<Func<XSubCategoryResourceDto, bool>> predicate = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
@@ -116,7 +116,7 @@ namespace xCategoryService.Interfaces
|
||||
/// <param name="predicate"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<XSubCategoryResourceDto>> FindMany(
|
||||
Task<IEnumerable<XSubCategoryResourceDto>> FindManyResource(
|
||||
Expression<Func<XSubCategoryResourceDto, bool>> predicate = null,
|
||||
Func<IQueryable<XSubCategoryResourceDto>, IOrderedQueryable<XSubCategoryResourceDto>> orderBuilder = null,
|
||||
CancellationToken cancellationToken = default
|
||||
|
||||
@@ -1,10 +1,129 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xCategoryService.Models.Dtos;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCategoryService.Providers.Dtos;
|
||||
using xModels.Dtos;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xCategoryService.Interfaces
|
||||
{
|
||||
public interface IXSubCategoryProviderController: IXBaseProvidedController<XSubCategory, XSubCategoryDto, int, XSubCategoryDtoHub>
|
||||
{ }
|
||||
public interface IXSubCategoryProviderController : IXBaseProvidedController<XSubCategory, XSubCategoryDto, int, XSubCategoryDtoHub>
|
||||
{
|
||||
/// <summary>
|
||||
/// Check Has Specified Locale or not ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/{id}/HasLocale")]
|
||||
Task<ActionResult<bool>> HasLocale(
|
||||
[FromRoute] int id,
|
||||
[FromQuery] string language,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Load an Item by all of it's Related Translations ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/{id}")]
|
||||
Task<ActionResult<XSubCategoryResourceDto>> GetResource(
|
||||
[FromRoute] int id,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Add Category Item for Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("Resources")]
|
||||
Task<ActionResult<XSubCategoryResourceDto>> Add(
|
||||
[FromBody] XSubCategoryDto item,
|
||||
[FromQuery] string language = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Update a Category Item for Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("Resources/{id}")]
|
||||
Task<ActionResult<XSubCategoryResourceDto>> Update(
|
||||
[FromRoute] int id,
|
||||
[FromBody] XSubCategoryDto item,
|
||||
[FromQuery] string language = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Refresh a Resource ...
|
||||
/// </summary>
|
||||
/// <param name="resource"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("Resources/Refresh")]
|
||||
Task<ActionResult<XSubCategoryResourceDto>> Refresh(
|
||||
[FromBody] XSubCategoryResourceDto resource,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Get All Resources ...
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/All")]
|
||||
Task<ActionResult<IEnumerable<XSubCategoryResourceDto>>> GetAllResources(
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Find One Resource ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/Find/One")]
|
||||
Task<ActionResult<XSubCategoryResourceDto>> FindOneResource(
|
||||
[FromQuery] string query,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Find Many Resource ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/Find/Many")]
|
||||
Task<ActionResult<IEnumerable<XSubCategoryResourceDto>>> FindManyResource(
|
||||
[FromQuery] string query,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve Resources by Query Pattern ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/Query")]
|
||||
Task<ActionResult<XQueryResult<XSubCategoryResourceDto>>> QueryResources(
|
||||
[FromQuery] XQuery query = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user