Timeline for How to avoid pollution of logic with lazy-loaded async properties
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 1, 2019 at 12:00 | history | tweeted | twitter.com/StackSoftEng/status/1168131519942156290 | ||
Sep 1, 2019 at 4:48 | answer | added | user1496062 | timeline score: 0 | |
Nov 8, 2017 at 20:53 | comment | added | tatigo | I'm using AsyncLazy<> . Need to have a cached value from async method, so basically would be using .Result to make the call synchronous , but wanted to avoid that | |
Nov 8, 2017 at 11:28 | comment | added | Shadow | Nope :( You have to think if do you really need lazy loading per property. Usually I do something like await OrderFactory.Preload(ids, full), and then access them in sync manner. | |
Nov 8, 2017 at 6:36 | comment | added | tatigo | Did you find a good solution for this? | |
Sep 16, 2016 at 12:07 | comment | added | Shadow |
To clarify it up a bit. I generally want it to be async, and lazy loaded. Just there is problem that usability suffers - no automapper, no linq, and code is not as clear as synchronous, because you have to await everything (await order.GetPayer()).DoSomething() .
|
|
Sep 16, 2016 at 9:29 | answer | added | David Arno | timeline score: 1 | |
Sep 16, 2016 at 9:16 | answer | added | Bernhard Hiller | timeline score: 2 | |
Sep 16, 2016 at 9:16 | answer | added | ratchet freak | timeline score: 7 | |
Sep 16, 2016 at 8:56 | review | First posts | |||
Sep 27, 2016 at 16:14 | |||||
Sep 16, 2016 at 8:53 | history | asked | Shadow | CC BY-SA 3.0 |