public async Task <DeleteEntityByIdPayload> DeleteAuthorizationAsync( [Service] IApplicationAuthorizationService service, Guid id, CancellationToken cancellationToken) { return(new DeleteEntityByIdPayload { Success = await service.DeleteByIdAsync(id, cancellationToken) }); }
// [Authorize(Policy = "Administrator")] public AuthorizationDto GetAuthorizationById(Guid id, [Service] IApplicationAuthorizationService context) { return(context.GetById(id).Adapt <AuthorizationDto>()); }
public List <AuthorizationDto> GetAuthorization([Service] IApplicationAuthorizationService context) { return(context.GetAll().ToList().Adapt <List <AuthorizationDto> >()); }
public DataSeedFacade(IDataSeedRunner dataSeedRunner, IApplicationAuthorizationService applicationAuthorizationService) { this.dataSeedRunner = dataSeedRunner; this.applicationAuthorizationService = applicationAuthorizationService; }