Show / Hide Table of Contents

# Class OpenIddictEntityFrameworkCoreApplicationStore<TApplication, TAuthorization, TToken, TContext, TKey>

Provides methods allowing to manage the applications stored in a database.

##### Inheritance

System.Object
OpenIddictEntityFrameworkCoreApplicationStore<TApplication, TAuthorization, TToken, TContext, TKey>
OpenIddictEntityFrameworkCoreApplicationStore<TContext>
OpenIddictEntityFrameworkCoreApplicationStore<TContext, TKey>

###### Namespace: OpenIddict.EntityFrameworkCore

###### Assembly: cs.temp.dll.dll

##### Syntax

    public class OpenIddictEntityFrameworkCoreApplicationStore<TApplication, TAuthorization, TToken, TContext, TKey> : IOpenIddictApplicationStore<TApplication> where TApplication : OpenIddictEntityFrameworkCoreApplication<TKey, TAuthorization, TToken> where TAuthorization : OpenIddictEntityFrameworkCoreAuthorization<TKey, TApplication, TToken> where TToken : OpenIddictEntityFrameworkCoreToken<TKey, TApplication, TAuthorization> where TContext : DbContext where TKey : IEquatable<TKey>

##### Type Parameters

Name | Description
--- | ---
TApplication | The type of the Application entity.
TAuthorization | The type of the Authorization entity.
TToken | The type of the Token entity.
TContext | The type of the Entity Framework database context.
TKey | The type of the entity primary keys.

### Constructors

#### OpenIddictEntityFrameworkCoreApplicationStore(IMemoryCache, TContext, IOptionsMonitor<OpenIddictEntityFrameworkCoreOptions>)

##### Declaration

    public OpenIddictEntityFrameworkCoreApplicationStore(IMemoryCache cache, TContext context, IOptionsMonitor<OpenIddictEntityFrameworkCoreOptions> options)

##### Parameters

Type | Name | Description
--- | --- | ---
IMemoryCache | cache |
TContext | context |
IOptionsMonitor<OpenIddictEntityFrameworkCoreOptions> | options |

### Properties

#### Cache

Gets the memory cache associated with the current store.

##### Declaration

    protected IMemoryCache Cache { get; }

##### Property Value

Type | Description
--- | ---
IMemoryCache |

#### Context

Gets the database context associated with the current store.

##### Declaration

    protected TContext Context { get; }

##### Property Value

Type | Description
--- | ---
TContext |

#### Options

Gets the options associated with the current store.

##### Declaration

    protected IOptionsMonitor<OpenIddictEntityFrameworkCoreOptions> Options { get; }

##### Property Value

Type | Description
--- | ---
IOptionsMonitor<OpenIddictEntityFrameworkCoreOptions> |

### Methods

#### ConvertIdentifierFromString(String)

Converts the provided identifier to a strongly typed key object.

##### Declaration

    public virtual TKey ConvertIdentifierFromString(string identifier)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | identifier | The identifier to convert.

##### Returns

Type | Description
--- | ---
TKey | An instance of `TKey` representing the provided identifier.

#### ConvertIdentifierToString(TKey)

Converts the provided identifier to its string representation.

##### Declaration

    public virtual string ConvertIdentifierToString(TKey identifier)

##### Parameters

Type | Name | Description
--- | --- | ---
TKey | identifier | The identifier to convert.

##### Returns

Type | Description
--- | ---
System.String | A System.String representation of the provided identifier.

#### CountAsync(CancellationToken)

##### Declaration

    public virtual ValueTask<long> CountAsync(CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<System.Int64> |

#### CountAsync<TResult>(Func<IQueryable<TApplication>, IQueryable<TResult>>, CancellationToken)

##### Declaration

    public virtual ValueTask<long> CountAsync<TResult>(Func<IQueryable<TApplication>, IQueryable<TResult>> query, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Func<IQueryable<TApplication>, IQueryable<TResult>> | query |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<System.Int64> |

##### Type Parameters

Name | Description
--- | ---
TResult |

#### CreateAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask CreateAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### DeleteAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask DeleteAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### FindByClientIdAsync(String, CancellationToken)

##### Declaration

    public virtual ValueTask<TApplication> FindByClientIdAsync(string identifier, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | identifier |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<TApplication> |

#### FindByIdAsync(String, CancellationToken)

##### Declaration

    public virtual ValueTask<TApplication> FindByIdAsync(string identifier, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | identifier |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<TApplication> |

#### FindByPostLogoutRedirectUriAsync(String, CancellationToken)

##### Declaration

    public virtual IAsyncEnumerable<TApplication> FindByPostLogoutRedirectUriAsync(string address, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | address |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TApplication> |

#### FindByRedirectUriAsync(String, CancellationToken)

##### Declaration

    public virtual IAsyncEnumerable<TApplication> FindByRedirectUriAsync(string address, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | address |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TApplication> |

#### GetAsync<TState, TResult>(Func<IQueryable<TApplication>, TState, IQueryable<TResult>>, TState, CancellationToken)

##### Declaration

    public virtual ValueTask<TResult> GetAsync<TState, TResult>(Func<IQueryable<TApplication>, TState, IQueryable<TResult>> query, TState state, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Func<IQueryable<TApplication>, TState, IQueryable<TResult>> | query |
TState | state |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<TResult> |

##### Type Parameters

Name | Description
--- | ---
TState |
TResult |

#### GetClientIdAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask<string> GetClientIdAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<System.String> |

#### GetClientSecretAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask<string> GetClientSecretAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<System.String> |

#### GetClientTypeAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask<string> GetClientTypeAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<System.String> |

#### GetConsentTypeAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask<string> GetConsentTypeAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<System.String> |

#### GetDisplayNameAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask<string> GetDisplayNameAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<System.String> |

#### GetDisplayNamesAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask<ImmutableDictionary<CultureInfo, string>> GetDisplayNamesAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<ImmutableDictionary<CultureInfo, System.String>> |

#### GetIdAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask<string> GetIdAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<System.String> |

#### GetPermissionsAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask<ImmutableArray<string>> GetPermissionsAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<ImmutableArray<System.String>> |

#### GetPostLogoutRedirectUrisAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask<ImmutableArray<string>> GetPostLogoutRedirectUrisAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<ImmutableArray<System.String>> |

#### GetPropertiesAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask<ImmutableDictionary<string, JsonElement>> GetPropertiesAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<ImmutableDictionary<System.String, JsonElement>> |

#### GetRedirectUrisAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask<ImmutableArray<string>> GetRedirectUrisAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<ImmutableArray<System.String>> |

#### GetRequirementsAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask<ImmutableArray<string>> GetRequirementsAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<ImmutableArray<System.String>> |

#### InstantiateAsync(CancellationToken)

##### Declaration

    public virtual ValueTask<TApplication> InstantiateAsync(CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<TApplication> |

#### ListAsync(Nullable<Int32>, Nullable<Int32>, CancellationToken)

##### Declaration

    public virtual IAsyncEnumerable<TApplication> ListAsync(int? count, int? offset, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Nullable<System.Int32> | count |
System.Nullable<System.Int32> | offset |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TApplication> |

#### ListAsync<TState, TResult>(Func<IQueryable<TApplication>, TState, IQueryable<TResult>>, TState, CancellationToken)

##### Declaration

    public virtual IAsyncEnumerable<TResult> ListAsync<TState, TResult>(Func<IQueryable<TApplication>, TState, IQueryable<TResult>> query, TState state, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Func<IQueryable<TApplication>, TState, IQueryable<TResult>> | query |
TState | state |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TResult> |

##### Type Parameters

Name | Description
--- | ---
TState |
TResult |

#### SetClientIdAsync(TApplication, String, CancellationToken)

##### Declaration

    public virtual ValueTask SetClientIdAsync(TApplication application, string identifier, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
System.String | identifier |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### SetClientSecretAsync(TApplication, String, CancellationToken)

##### Declaration

    public virtual ValueTask SetClientSecretAsync(TApplication application, string secret, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
System.String | secret |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### SetClientTypeAsync(TApplication, String, CancellationToken)

##### Declaration

    public virtual ValueTask SetClientTypeAsync(TApplication application, string type, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
System.String | type |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### SetConsentTypeAsync(TApplication, String, CancellationToken)

##### Declaration

    public virtual ValueTask SetConsentTypeAsync(TApplication application, string type, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
System.String | type |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### SetDisplayNameAsync(TApplication, String, CancellationToken)

##### Declaration

    public virtual ValueTask SetDisplayNameAsync(TApplication application, string name, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
System.String | name |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### SetDisplayNamesAsync(TApplication, ImmutableDictionary<CultureInfo, String>, CancellationToken)

##### Declaration

    public virtual ValueTask SetDisplayNamesAsync(TApplication application, ImmutableDictionary<CultureInfo, string> names, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
ImmutableDictionary<CultureInfo, System.String> | names |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### SetPermissionsAsync(TApplication, ImmutableArray<String>, CancellationToken)

##### Declaration

    public virtual ValueTask SetPermissionsAsync(TApplication application, ImmutableArray<string> permissions, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
ImmutableArray<System.String> | permissions |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### SetPostLogoutRedirectUrisAsync(TApplication, ImmutableArray<String>, CancellationToken)

##### Declaration

    public virtual ValueTask SetPostLogoutRedirectUrisAsync(TApplication application, ImmutableArray<string> addresses, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
ImmutableArray<System.String> | addresses |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### SetPropertiesAsync(TApplication, ImmutableDictionary<String, JsonElement>, CancellationToken)

##### Declaration

    public virtual ValueTask SetPropertiesAsync(TApplication application, ImmutableDictionary<string, JsonElement> properties, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
ImmutableDictionary<System.String, JsonElement> | properties |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### SetRedirectUrisAsync(TApplication, ImmutableArray<String>, CancellationToken)

##### Declaration

    public virtual ValueTask SetRedirectUrisAsync(TApplication application, ImmutableArray<string> addresses, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
ImmutableArray<System.String> | addresses |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### SetRequirementsAsync(TApplication, ImmutableArray<String>, CancellationToken)

##### Declaration

    public virtual ValueTask SetRequirementsAsync(TApplication application, ImmutableArray<string> requirements, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
ImmutableArray<System.String> | requirements |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### UpdateAsync(TApplication, CancellationToken)

##### Declaration

    public virtual ValueTask UpdateAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |