/// <summary> /// Returns the number of failed access attempts for the user /// </summary> /// <param name="manager"></param> /// <param name="userId"></param> /// <returns></returns> public static int GetAccessFailedCount <TUser, TKey>(this UserManager <TUser, TKey> manager, TKey userId) where TKey : IEquatable <TKey> where TUser : class, IUser <TKey> { if (manager == null) { throw new ArgumentNullException("manager"); } return(AsyncHelper.RunSync(() => manager.GetAccessFailedCountAsync(userId))); }