diff --git a/Interfaces/IXBaseReferenced.cs b/Interfaces/IXBaseReferenced.cs index 0129904..0888c78 100644 --- a/Interfaces/IXBaseReferenced.cs +++ b/Interfaces/IXBaseReferenced.cs @@ -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>> GetReferences( + Guid id, + + ); } } \ No newline at end of file diff --git a/Interfaces/IXBaseReferencedController.cs b/Interfaces/IXBaseReferencedController.cs new file mode 100644 index 0000000..f607a55 --- /dev/null +++ b/Interfaces/IXBaseReferencedController.cs @@ -0,0 +1,63 @@ +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using xModels.Base; + +namespace xIdentityService.Interfaces +{ + public interface IXBaseReferencedController + where TEntity : XBaseEntity + { + /// + /// Check an Item Has Reference to Specified ProvideFor and Specified forProvidedId ... + /// + /// + /// + /// + /// + /// + [HttpGet("{id}/Reference/IsProvidedFor")] + Task> IsProvidedFor( + [FromRoute] TKey id, + [FromQuery] string providedFor, + [FromQuery] object forProvidedId, + CancellationToken cancellationToken = default + ); + + /// + /// Add a Reference to Item for Specified ProvideFor and Specified forProvidedId ... + /// + /// + /// + /// + /// + /// + /// + [HttpPost("{id}/Reference")] + Task AddReference( + [FromRoute] TKey id, + [FromQuery] string providedFor, + [FromQuery] object forProvidedId, + [FromQuery] int forIndex = 0, + CancellationToken cancellationToken = default + ); + + /// + /// Remove a Reference from Item for Specified ProvideFor and Specified forProvidedId ... + /// + /// + /// + /// + /// + /// + /// + [HttpDelete("{id}/Reference")] + Task RemoveReference( + [FromRoute] TKey id, + [FromQuery] string providedFor, + [FromQuery] object forProvidedId, + [FromQuery] int forIndex = 0, + CancellationToken cancellationToken = default + ); + } +} \ No newline at end of file