public static void AddErrorsIfFailed(this IdentityResult result, TempDataDictionary tempData) { if (!result.Succeeded) tempData.AddMessages(MessageType.Warning, result.Errors); }