Open ajj7060 opened 6 years ago
iirc you should use the new
keyword and the data portal will use your async method.
This just caught me out as well. We have style conventions that complain if Async methods don't end in the word Async
. Perhaps it would be a nice idea to enable CSLA to find DataPortal_ExecuteAsync
etc. For now I can simply surpress these naming style rules in a surpression file as a workaround so not a huge issue.
I know you can do
private Task DataPortal_Fetch(int id)
and Csla will do the right thing and await the fetch method. I'm now needing to call an async method in myDataPortal_Insert
, which is defined in the BusinessBase. I can't override the method to make it return Task, and if I declare itprivate Task DataPortal_Insert()
I get a warning about needingnew
which makes me wonder if Csla will find the right method.How do I correctly use async/away from with in
DataPortal_Execute()
,DataPortal_Insert()
, andDataPortal_Update()
?