In past projects with versions of EF5 and EF4, the IsRequired() fluent API method would thrown a DbEntityValidationException if the property was null or an empty string. In my
EF Core 2.1 here - looks like marking a property as required using [Required] and saving it to the DB with empty string value, let's it go through... very strange.
Documentation states the following:
//
// Summary:
// Gets or sets a value that indicates whether an empty string is allowed.
//
// Returns:
// true if an empty string is allowed; otherwise, false. The default value is false.
public bool AllowEmptyStrings { get; set; }