Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Blazor WASM throwing exception when trying to run EF Core #17799
Describe the bug
I'm trying to run an experiment using Blazor for WASM -- I'm trying to run Entity Framework Core with the InMemory provider. I setup a very basic model of two entities and very simple DBContext. And a very basic test of simply creating a couple entities, then trying to persist the context.
My expectation was that since EF Core is compatible with .NET Standard 2.0/2.1, as is the InMemory provider, and there should not be any "platform not supported" issues, such as network or disk I/O with this setup, that EF Core should work.
However, I'm seeing WASM exceptions, such as
To be sure that this isn't due to some bits being linked away, I disabled the linker altogether, but this did not seem to have any impact.
I have a very simple EF model and context setup:
and then in a Razor page, I have a very simple invocation that produces the error:
I'm including the top of the exception stack as provided from Firefox console:
and from the exception:
Further technical details
I know this is not a conventional scenario and may not be something that will ever be supported, but I'm looking for at least some guidance as to where to look for the issue. Is the