internal bool CompatibleWithModel(bool throwIfNoMetadata, DatabaseExistenceState existenceState) { return(_internalContext.CompatibleWithModel(throwIfNoMetadata, existenceState)); }
/// <summary> /// Checks whether or not the database is compatible with the the current Code First model. /// </summary> /// <remarks> /// Model compatibility currently uses the following rules. /// If the context was created using either the Model First or Database First approach then the /// model is assumed to be compatible with the database and this method returns true. /// For Code First the model is considered compatible if the model is stored in the database /// in the Migrations history table and that model has no differences from the current model as /// determined by Migrations model differ. /// If the model is not stored in the database but an EF 4.1/4.2 model hash is found instead, /// then this is used to check for compatibility. /// </remarks> /// <param name="throwIfNoMetadata"> /// If set to <c>true</c> then an exception will be thrown if no model metadata is found in the database. If set to <c>false</c> then this method will return <c>true</c> if metadata is not found. /// </param> /// <returns> True if the model hash in the context and the database match; false otherwise. </returns> public bool CompatibleWithModel(bool throwIfNoMetadata) { return(_internalContext.CompatibleWithModel(throwIfNoMetadata)); }