private void EnsureCurrentlyValid()
{
//I'm valid if IDataErrorInfo.this[] returns null for every property
var propsToValidate = new[] { "Name", "Email", "Phone", "WillAttend" };
bool isValid = propsToValidate.All(x => this[x] == null);
if (!isValid)
throw new InvalidOperationException("Can't submit invalid GuestResponse");
}
'System.Array' does not contain a definition for 'All' and no extension method 'All' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?) C:\dev\aspnet\PartyInvites\Models\GuestResponse.cs
What am I missing?