Replies: 1 comment 9 replies
-
Another thing to consider is that SSB can co-exist with Razor Pages, MVC, and web API code. To me this implies that two different sets of config and state might be required: one for SSB and another for the rest of the aspnetcore code running "in the same context". Sounds like a mess to me! |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm finding some of the CSLA configuration in an ASP.NET Core app a little confusing:
Csla.Blazor.ApplicationContextManager
in the Blazor project but it only seems to be used by client-side Blazor. I'm thinking we may need a context manager specifically for server-side Blazor to handle some of the issues raised here. In which case would it be better in theCsla.Blazor.WebAssembly
project? It might be worth considering a new project for SSB, e.g.Csla.Blazor.Server
, to put only the SSB stuff.services.AddCsla()
. The extension method is in the core project so it doesn't register the 'Csla.AspNetCore.ApplicationContextManager' context manager. Instead a singleton is created by another extension method inStartup.Configure
(app.UseCsla()
). It would be better added to the service collection:services.AddSingleton<IContextManager, Csla.AspNetCore.ApplicationContextManager>();
ideally insideservices.AddCsla()
(but that would have to be moved into the Csla.AspNetCore project). Unless you added another extension likeservices.AddCsla().WithAspNet()
or moved ASP config into it's own namespace. It’s a bit ugly though!What do you think? I'd appreciate your comments/suggestions as always.
Beta Was this translation helpful? Give feedback.
All reactions