CosmosModelBuilderExtensions.CanSetDefaultContainer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a value indicating whether the given container name can be set as default.
public static bool CanSetDefaultContainer (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, string name, bool fromDataAnnotation = false);
public static bool CanSetDefaultContainer (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, string? name, bool fromDataAnnotation = false);
static member CanSetDefaultContainer : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * string * bool -> bool
<Extension()>
Public Function CanSetDefaultContainer (modelBuilder As IConventionModelBuilder, name As String, Optional fromDataAnnotation As Boolean = false) As Boolean
Parameters
- modelBuilder
- IConventionModelBuilder
The model builder.
- name
- String
The default container name.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
true
if the given container name can be set as default.
Remarks
See Modeling entity types and relationships, and Accessing Azure Cosmos DB with EF Core for more information and examples.
Applies to
Entity Framework