示例#1
0
        public static AccountEntry GetAccount(uint accountId)
        {
            lock (AuthDatabaseAccess.Lock)
            {
                GetAccountByIdCommand.Parameters["@AccountId"].Value = accountId;

                using (var reader = GetAccountByIdCommand.ExecuteReader())
                    return(AccountEntry.Read(reader));
            }
        }
示例#2
0
        public static AccountEntry GetAccount(string accountName)
        {
            lock (AuthDatabaseAccess.Lock)
            {
                GetAccountByNameCommand.Parameters["@AccountName"].Value = accountName;

                using (var reader = GetAccountByNameCommand.ExecuteReader())
                    return(AccountEntry.Read(reader));
            }
        }