Add params overload for EnsureProperties in EntityBaseOptions
Added a public EnsureProperties method accepting a params string[] in EntityBaseOptions. This provides a more convenient way to ensure multiple properties are configured, internally delegating to the existing IEnumerable-based method.
This commit is contained in:
@@ -11,4 +11,7 @@ public record EntityBaseOptions()
|
||||
if (missingProperties.Count != 0)
|
||||
throw new InvalidOperationException($"The following properties are not configured: {string.Join(", ", missingProperties)}");
|
||||
}
|
||||
|
||||
public void EnsureProperties(params string[] propertyNames)
|
||||
=> EnsureProperties(propertyNames.AsEnumerable());
|
||||
}
|
||||
Reference in New Issue
Block a user