ASP.NET and Entity Framework
I’ve been trialing rider as a replacement for parallels + Windows on my M1 Mac. I love the look and feel of rider, but I can’t seem to figure out how to get my ASP.Net + EF6 app to work properly.
The layout has DAL and the ASP.NET as to separate projects within the same solution.
I’m running the app with a manual build configuration that builds the solution than runs mono’s XSP to serve it.
I noticed that with this method, I have to change my web.config to allow access to the assets folder, but then using DAL(EF6) for anything fails with it either being unable to find the embedded EF metadata or when I provide that from VS, it always returns null in all queries.
For the metadata issue, it looks as though when rider compiles the DAL project, it isn’t running EntityDeploy, so the metadata never gets built. But I can’t seem to get Rider to build it.
But as for all queries returning null when taken from a pre-built DAL, I have no idea.
Is there a different way to go about this? Or am I trying to do something that rider doesn’t support?
Please sign in to leave a comment.
(I'm not JetBrains just commenting as a user.)
Is it ASP.NET 4 or ASP.NET Core?
Are you using sdk csproj?
Two things that are tricky are:
- getting model-first EF to work with sdk csproj
- getting ASP.NET 4 to work with sdk csproj
As far as I know, ASP.NET 4 + sdk csproj just won't work. You have to either use old-style csproj or ASP.NET Core. My ASP.NET 4 projects are stuck with old-style csproj for now.
For EF, I'm not sure if I ever got model-first (edmx) to work with sdk csproj. Also Rider EF tools doesn't work with sdk csproj either. I've had to switch to code-first EF6 and use migrations from VS Package Manager Console instead.
(Would love fixes/work arounds for either of these.)
Hi David and Dave!
Rider doesn't support edmx for now, unfortunately.
David, could you please share a sample of your solution configuration? So we could double-check on our side.
Thanks!