You may want to place them in the Shared project instead of the Domain project, then just reference them in the Shared project throughout the application. I wouldn't reference the Domain project from your Blazor WebAssembly app, because I'm pretty sure it would upload the Domain .dll into the client, which someone could decompile if they wanted. Anything you place in the Shared project will be uploaded into the client.
This one pertains to Blazor WebAssembly (asp.net core hosted).
I have an enum type that represents use cases an application supports. It lives inside Domain project since it is domain specific.
I want to use the enum from Blazor Client, but that requires referencing the Domain project (which is not recommended I guess?).
The only solution I see is to create a similar enum type inside Shared project and map it to the Domain one on Server side. This sounds inconvenient as I may end up with lots of types that are copies of those found in Domain.
What better solutions would you recommend?
0Posted 89 days ago by selliott