CSLA 6 way to LazyGetProperty? #2829
Replies: 4 comments 16 replies
-
get => LazyGetProperty<PersonEdit>(ChildProperty, ()
=> ApplicationContext.GetRequiredService<IDataPortal<<PersonEdit>>().Fetch(123)); or get => LazyGetPropertyAsync<PersonEdit>(ChildProperty,
ApplicationContext.GetRequiredService<IDataPortal<<PersonEdit>>().FetchAsync(123)); |
Beta Was this translation helpful? Give feedback.
-
Hi Rocky, That fixes it. Thanks. After I upgraded Csla from 5.5.3 to 6.1.0, I noticed there is a noticeable slowness in the app that I didn't notice when I upgraded Csla from 4.X to 5.X. My code in 5.5.3 is still the old-style DataPortal_XYZ and I only use DI in 6.1.0. and I suspect this is the reason it is slower. I read that Csla 5.X do a lot of things Csla 4.X didn't do and this account for its slowness. I only use Csla for one thing, and that is N Level Undo. I wonder if there is a way you have an enum so users of Csla can pick and choose what functions they want to enable and what functions they can disable. This way a user can save a lot of overhead for functions they don't use anyway. If this is possible, it will be great. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I'm encountering difficulties configuring a straightforward scenario. Imagine I have a database with two tables: "Person" containing Id , Name and CityId, and "Location" with CityId, CityName and State. I've successfully created a ReadOnlyListBase for persons, but when attempting to include the location information (which is in a readonlybase LocationInfo) in PersonInfo, various errors arise, such as: ChildDataportal failure. My objective is to display the Id, PersonName, City, and State in a grid. While I can successfully retrieve the PersonId and Name, issues arise when trying to integrate location details. |
Beta Was this translation helpful? Give feedback.
-
The stack overflow can occur if there is a collection of persons that have location. If you're using EF Core, their maybe a virtual member that points back to the Person. This is where I've experienced a stack overflow because it'll be self referencing for ever. But at this point, it's purely conjecture on my part, because I would need to see the class structure and how are you mapping between the EF core (if used) and the CSLA class? If you're using Automapper, I'd start there.
But in any case, I would need to see the class structures to assit.
Have a nice day.
Kevin
https://rb.gy/syiuf
…________________________________
From: Ashish Sinha ***@***.***>
Sent: Thursday, November 23, 2023 11:27 AM
To: MarimerLLC/csla ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [MarimerLLC/csla] CSLA 6 way to LazyGetProperty? (Discussion #2829)
I'm encountering difficulties configuring a straightforward scenario. Imagine I have a database with two tables: "Person" containing Id and Name, and "Location" with CityId, CityName and State.
I've successfully created a ReadOnlyListBase for persons, but when attempting to include the location information in PersonInfo, various errors arise, such as:
ChildDataportal failure.
Stack overflow.
My objective is to display the Id, PersonName, City, and State in a grid. While I can successfully retrieve the PersonId and Name, issues arise when trying to integrate location details.
—
Reply to this email directly, view it on GitHub<#2829 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGJTVDRP3XGSNCOGBEVDHI3YF52PHAVCNFSM5QUH3MQ2U5DIOJSWCZC7NNSXTOKENFZWG5LTONUW63SDN5WW2ZLOOQ5TONRVGM3DCNY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What's the new way to
LazyGetProperty
? I can't see anything in the samples.Beta Was this translation helpful? Give feedback.
All reactions