Affecto.IdentityManagement.Store.EntityFramework.Queries.AccountExistsQuery.Execute C# (CSharp) Method

Execute() public method

public Execute ( AccountType type, string accountName ) : bool
type AccountType
accountName string
return bool
        public bool Execute(AccountType type, string accountName)
        {
            return accounts.Any(a => a.Type == type && a.Name == accountName);
        }

Usage Example

 public bool AccountExists(AccountType type, string name)
 {
     AccountExistsQuery query = new AccountExistsQuery(dbContext.Accounts);
     return query.Execute(type, name);
 }