D 2019-10-30T18:28:39.287 J icomment Hello,\sOT\shere\sagain\s(the\sone\swith\sthe\sattachment\sat\s2019-10-30\s12:42:14\swas\sa\sdifferent\sperson),\r\n\r\nI\swanted\sto\snote\sthat\syears\sago\sI\sgot\srid\sof\sall\smagic\stokens\sinside\sapp.config\sor\s.edmx\sfiles\s(meanwhile\smigrated\sto\scode\sfirst)\sby\sdoing\stwo\sthings:\r\n\r\n1)\sThe\sclass\sinheriting\sfrom\sDbContext\sonly\suses\sthe\sctor\swhich\spasses\sin\sa\sread\sDbConnection\sinstance.\sIn\smy\scase\sthis\scan\sbe\sSQLServer\sor\sSQLite,\sdetermined\sat\sruntime\sby\suser\ssettings.\r\n\r\n2)\sThere\sis\sone\sconfiguration\sclass\sinside\sthe\ssame\sassembly\sinheriting\sfrom\sSystem.Data.Entity.DbConfiguration\sand\sdoing\sthe\sfollowing\sinside\sthe\sctor:\r\n\r\n\tthis.SetProviderFactory("System.Data.SQLite",\sSystem.Data.SQLite.SQLiteFactory.Instance);\r\n\tvar\sproviderServices\s=\sGetService(System.Data.SQLite.EF6.SQLiteProviderFactory.Instance);\r\n\tDebug.Assert(providerServices\s!=\snull,\s"providerServices\s!=\snull");\r\n\t\t\tthis.SetProviderServices("System.Data.SQLite",\sproviderServices);\r\n\r\nWhy\sand\show\sthis\sworks\sI\sfigured\sout\susing\sReflection\syears\sago.\sMight\sbe\soutdated. J login anonymous J mimetype text/x-fossil-plain K ad28d8e026c4c2275547a58bac3fe426ead63faa U anonymous Z a7030371fab25420711e4c4bf6a2c4a5