kast ...
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using xDataService.Models;
|
||||
using xIdentityModels.Models;
|
||||
|
||||
namespace xIdentityService.Interfaces
|
||||
@@ -76,6 +78,11 @@ namespace xIdentityService.Interfaces
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
);
|
||||
|
||||
Task<IEnumerable<XReference<string>>> GetReferences(
|
||||
Guid id,
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xModels.Base;
|
||||
|
||||
namespace xIdentityService.Interfaces
|
||||
{
|
||||
public interface IXBaseReferencedController<TEntity, TKey>
|
||||
where TEntity : XBaseEntity<TKey>
|
||||
{
|
||||
/// <summary>
|
||||
/// Check an Item Has Reference to Specified ProvideFor and Specified forProvidedId ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="providedFor"></param>
|
||||
/// <param name="forProvidedId"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{id}/Reference/IsProvidedFor")]
|
||||
Task<ActionResult<bool>> IsProvidedFor(
|
||||
[FromRoute] TKey id,
|
||||
[FromQuery] string providedFor,
|
||||
[FromQuery] object forProvidedId,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Add a Reference to Item for Specified ProvideFor and Specified forProvidedId ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="providedFor"></param>
|
||||
/// <param name="forProvidedId"></param>
|
||||
/// <param name="forIndex"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("{id}/Reference")]
|
||||
Task<ActionResult> AddReference(
|
||||
[FromRoute] TKey id,
|
||||
[FromQuery] string providedFor,
|
||||
[FromQuery] object forProvidedId,
|
||||
[FromQuery] int forIndex = 0,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Remove a Reference from Item for Specified ProvideFor and Specified forProvidedId ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="providedFor"></param>
|
||||
/// <param name="forProvidedId"></param>
|
||||
/// <param name="forIndex"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{id}/Reference")]
|
||||
Task<ActionResult> RemoveReference(
|
||||
[FromRoute] TKey id,
|
||||
[FromQuery] string providedFor,
|
||||
[FromQuery] object forProvidedId,
|
||||
[FromQuery] int forIndex = 0,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user