Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Edited Issue: Make provider manifest and information available to model conventions [1236]

$
0
0
While the Code First pipeline has access to the provider manifest instance and provider information the whole time during model construction, the ProviderManifest and ProviderInfo properties on the store EdmModel instance that is passed to store model conventions are not populated until after all conventions have been processed. This blocks writing certain types of model conventions that need to rely on provider functionality, e.g. to obtain the appropriate store type for a given EDM type.

The solution is to simply move the two lines that set the properties to an earlier point in the Build method:

```
databaseMapping.Database.ProviderManifest = providerManifest;
databaseMapping.Database.ProviderInfo = providerInfo;
```

Viewing all articles
Browse latest Browse all 10318

Trending Articles