Hi, At February 10, 2017, 3:28 AM, Jiří Činčura wrote:
> Well, you're not saying anything specific about the exception (at least > which provider - EF or ADO.NET?) nor how's the assembly loaded (because > you can as well use the config file, depending on how it's loaded). > Let's guess that it's a ADO.NET provider, then you're probably missing > the DbProviderFactory piece > (https://github.com/cincuranet/EF6_Firebird/blob/master/CodeFirst/App.config#L12). > With that, I would go the easiest way and pass directly FbConnection to > DbContext's ctor. Sorry, for not being clearer. Here's the exact error message, that I receive when running from Visual Studio: [Error Message Quote] An exception of type 'System.InvalidOperationException' occurred in EntityFramework.dll but was not handled in user code Additional information: No Entity Framework provider found for the ADO.NET provider with invariant name 'FirebirdSql.Data.FirebirdClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. [/Error Message Quote] Here's the code that I use: using (var db = new FiloptoDataLibrary.FiloptoQuickBooksModel(new FbConnection(vFBConnectionString.ToString()), true)) { ... } The FiloptoQuickBooksModel is inherited from DbContext, and was created by the Entity Framework Tools Code First from Database wizard. The vFBConnectionString is a FbConnectionStringBuilder. And, in the project's App.Config, all the entries are there. But, the project compiles to a .dll and doesn't have a .config file with it(when compiled). And, since the application that is calling this .dll is not a .Net application(it's a native Win32 Delphi application), I am trying to find out how to setup the entity framework provider for usage in the .dll. And, since it is possible to register the entity framework provider in code, in EF6, I'm wondering what would be the required code, when trying to follow the example from Microsoft, provided in the link of my previous message. I am using Visual Studio 2015, EF 6.1.3 and targetting .Net 4.6.2. I did thought of using the EntityConnectionStringBuilder, but it is looking for the metadata files(.csdl, .ssdl, .msl), which don't exist in my case. Unless, there is a way to tell it to ignore the metadata files, when using the EntityConnectionString, because at least here I would be able to specify the provider. If more information is needed, just let me know. -- Best regards, Daniel Rail Senior Software Developer ACCRA Solutions Inc. (www.accra.ca) ACCRA Med Software Inc. (www.filopto.com) ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider