I know I'm not solving your actual problem but could you use a separate SQL database for EF? That was the approach I took and managed to get things wired up ok!
There are people who believe that using a separate database for non umbraco data is the safer / right approach to take anyway! At least then you know that Umbraco migrations and EF migrations would never have any conflict. Good luck :)
I actually thought you had a solution you wanted to share?, because I still have problems using the
"Microsoft.EntityFrameworkCore.SqlServer"
package, when I install that package it's a bit like there is a conflict and umbraco doesn't know how to use the UmbracoDBDSN connection string and goes directly to the install umbraco page.
so do you have a running example where you connect to two DB´s ? if so can you tell me how you did it without this "conflict" using
"Microsoft.EntityFrameworkCore.SqlServer"
you have to use a separate connection string and context for your EF and you have to use the same Umbraco package version of Microsoft.EntityFrameworkCore.SqlServer.
EF Core, DBContext and Umbraco 10
I have run into a problem when i am using
"Microsoft.EntityFrameworkCore.SqlServer"
I add my DBContext like this to startup
Then umbraco DB connection fails and Umbraco returns to showing install page any thoughts on why ?
I need to access custom tables with EF
Hi René,
I know I'm not solving your actual problem but could you use a separate SQL database for EF? That was the approach I took and managed to get things wired up ok!
Just a thought :)
Lotte
Any ideas are welcome :)
so yes i could use a setup where i just use another DB to store my custom tables in.
There are people who believe that using a separate database for non umbraco data is the safer / right approach to take anyway! At least then you know that Umbraco migrations and EF migrations would never have any conflict. Good luck :)
I actually thought you had a solution you wanted to share?, because I still have problems using the
package, when I install that package it's a bit like there is a conflict and umbraco doesn't know how to use the UmbracoDBDSN connection string and goes directly to the install umbraco page.
so do you have a running example where you connect to two DB´s ? if so can you tell me how you did it without this "conflict" using "Microsoft.EntityFrameworkCore.SqlServer"
Hi,
you have to use a separate connection string and context for your EF and you have to use the same Umbraco package version of Microsoft.EntityFrameworkCore.SqlServer.
I just came across the same issue. I resolved by adding the following references in the project file, Item group:
The build status told me which packages to reference.
is working on a reply...