I'm trying to turn on use of cached entity models (after reading https://mirkomaggioni.com/2018/01/06/performance-improvements-in-entity-framework-6-2/) along with Npgsql provider.
Class NpgsqlConfiguration Inherits System.Data.Entity.DbConfiguration Public Sub New() Dim provider = "Npgsql" SetProviderServices(provider, Npgsql.NpgsqlServices.Instance) SetProviderFactory(provider, Npgsql.NpgsqlFactory.Instance) SetDefaultConnectionFactory(New Npgsql.NpgsqlConnectionFactory()) SetModelStore(New DefaultDbModelStore(Directory.GetCurrentDirectory())) End Sub End Class
At the first run Edmx model is generated, with valid content. However on the second run exception occurs, when i try to get access to some db sets from the context
System.ArgumentException: 'The path is not of a legal form.'
How can i overcome this? Thanks for the help.
Entity framework 6.2.0, Ngpsql 4.0.2, ef.npgsql 3.2.0
I'm using Costura.Fody for the solution, and when i've disabled it, EF started to load the generated model.
Hovewer I've didn't notice any significant performance boost :/
I have 46 entities (tables) in the model, may be it is too small amount to find the effect of caching..