Export (0) Print
Expand All

Database::CompatibleWithModel Method

Entity Framework 5.0

This method returns true if the context has a model hash and the database contains a model hash and these hashes match. This indicates that the model used to create the database is the same as the current model and so the two can be used together.

Namespace:  System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

bool CompatibleWithModel(
	bool throwIfNoMetadata


Type: System::Boolean

If set to true then an exception will be thrown if no model metadata is found either in the model associated with the context or in the database itself. If set to false then this method will return true if metadata is not found.

Return Value

Type: System::Boolean
True if the model hash in the context and the database match; false otherwise.
© 2014 Microsoft