MarimerLLC / cslaforum

Discussion forum for CSLA .NET
https://cslanet.com
Other
31 stars 6 forks source link

i am looking for smaple code aspnetcore+angular5+csla with all functionality cover #588

Open wasiuddin7 opened 6 years ago

wasiuddin7 commented 6 years ago

i am working on aspnetcore+angular5+csla but i am facing problem at csla side like

      • LazyLoadProperty (how to call the LazyLoadProperty)
    • -Parent Child Propery
    • -application.context.user

Version and Platform CSLA version: 4.7.100 OS: Windows, Linux, iOS, Android, etc. Platform: WinForms, WPF, ASP.NET Core, MVC, Xamarin, etc.

rockfordlhotka commented 6 years ago

In the case of an Angular client-side app talking to a set of REST services hosted in ASP.NET I don't see where lazy loading (within CSLA) makes any sense at all.

You are really creating two different apps - the client app in TypeScript/Angular, and a server app that consists of a set of services written in .NET/CSLA.

The services you write in .NET/CSLA need to do all their work, and return a set of (typically JSON) data to the client app, all in one call from the client. They can still use async/await, but they need to collect all the data, format it into JSON, and return that JSON to the client.

That's best done without any use of lazy loading. Lazy loading is valuable for a smart client scenario, where CSLA is running on that smart client. That doesn't exist with a TypeScript/Angular client app, because CSLA can't run in the client.

(that'll change with WebAssembly and technologies like Blazor, but then you wouldn't be using Angular on the client, you'd be using .NET/CSLA on the client).