Algumas dicas: 1) O repositΓ³rio no Entity Core pode ser todo Async 2) No List retorne caso queira async ValueTask < List < T > >. Para isso utilize await e ToListAsync 3) No controller nΓ£o utilize Task.Run e modifique assinatura para retornar async ValueTask < IActionResult > 4) Sempre que possΓvel utilize ValueTask ao invΓ©s de Task 5) Sempre que possΓvel utilize async e await
Ao escrever alguns cΓ³digo nessa resposta o site tΓ‘ cortando algumas palavras (deve ser por achar que sΓ£o tags Html)
Interessante. NΓ£o sabia sobre esse ValueTask. Vou pesquisar.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Algumas dicas:
1) O repositΓ³rio no Entity Core pode ser todo Async
2) No List retorne caso queira async ValueTask < List < T > >. Para isso utilize await e ToListAsync
3) No controller nΓ£o utilize Task.Run e modifique assinatura para retornar async ValueTask < IActionResult >
4) Sempre que possΓvel utilize ValueTask ao invΓ©s de Task
5) Sempre que possΓvel utilize async e await
Ao escrever alguns cΓ³digo nessa resposta o site tΓ‘ cortando algumas palavras (deve ser por achar que sΓ£o tags Html)
Interessante. NΓ£o sabia sobre esse ValueTask. Vou pesquisar.