Nucleus .Net Core CMS

Managers.IApiKeyManager Interface

Namespace: Nucleus.Abstractions.Managers
Assembly: Nucleus.Abstractions.dll
Defines the interface for the ApiKey Manager class, which rovides functions to manage database data for Models.ApiKeys.

Remarks

Get an instance of this class from dependency injection by including a parameter in your class constructor.

Example

public class MyClass 
{ 
  private IApiKeyManager ApiKeyManager { get; } 
  public MyClass(IUserManager userManager, IApiKeyManager apiKeyManager, Context context) 
  { 
    this.ApiKeyManager = apiKeyManager; 
  } 
}

Methods

CreateNew

CreateNew ()
Create a new Models.ApiKey with default values.
Remarks
This function does not save the new Models.ApiKey to the database. Call Save to save the ApiKey.

Get (Guid) Method

Get (Guid id)
Retrieve an existing Models.ApiKey from the database.
Parameters
Name Type
id Guid

List

List ()
List all Models.ApiKeys.

List (PagingSettings) Method

List (PagingSettings pagingSettings)
List paged Models.ApiKeys.
Parameters
Name Type
pagingSettings Nucleus.Abstractions.Models.Paging.PagingSettings

Save (ApiKey) Method

Save (ApiKey key)
Create or update the specified Models.ApiKey.
Parameters
Name Type
key Nucleus.Abstractions.Models.ApiKey

Delete (ApiKey) Method

Delete (ApiKey key)
Delete the specified Models.ApiKey from the database.
Parameters
Name Type
key Nucleus.Abstractions.Models.ApiKey