sjh37 / EntityFramework-Reverse-POCO-Code-First-Generator

EntityFramework Reverse POCO Code First Generator - Beautifully generated code that is fully customisable. This generator creates code as if you reverse engineered a database and lovingly created the code by hand. It is free to academics (you need a .edu or a .ac email address), not free for commercial use. Obtain your licence from
https://www.reversepoco.co.uk/
Other
711 stars 227 forks source link

SQLite - Unable to find the requested .Net Framework Data Provider #809

Open statler opened 1 year ago

statler commented 1 year ago

I am having trouble generating the SQLite configs when using an EF7 library. I am getting the following error

System.ArgumentException: 'Unable to find the requested .Net Framework Data Provider. It may not be installed.'

Happens at: var factory = DbProviderFactories.GetFactory(providerName);

I know this is caused by the factory not being registered - which is understandable in a framework app, but this is not how the EF Core config works - e.g. there is no app.config. Further, the provider is Microsoft.data.sqlite.

I expect there is something hacky that has to be done to get the factopry to work. Can you please advise - maybe some docs or something?

sjh37 commented 1 year ago

Yes you are correct you need to register it. Have a read of the Sqlite wiki here hopefully that will get you up and running in no time.