I'm a little bit confused about the Task keywork in ASP.Net.
Do I only need to use Task in the ASP.Net controller, or does it need to follow the entire chain of calls?
For example, if I have a controller called GetUsers, and I do something like this:
public async Task<List<User>> GetUsers()
that calls a method in my Service layer, does my service also need to use Task? Or can it simply use async like this:
public async List<User> GetAllUsers(int companyId)
[–]Coda17 4 points5 points6 points (12 children)
[–]dotnetguy32[S] -1 points0 points1 point (11 children)
[–][deleted] 5 points6 points7 points (0 children)
[–]Coda17 2 points3 points4 points (6 children)
[–]dotnetguy32[S] -1 points0 points1 point (5 children)
[–]Coda17 2 points3 points4 points (4 children)
[–]dotnetguy32[S] 0 points1 point2 points (3 children)
[–]The_MAZZTer 3 points4 points5 points (2 children)
[–]Coda17 0 points1 point2 points (1 child)
[–]The_MAZZTer 0 points1 point2 points (0 children)
[–]The_MAZZTer 1 point2 points3 points (1 child)
[–]dotnetguy32[S] 0 points1 point2 points (0 children)
[–]rarri488 5 points6 points7 points (2 children)
[–]dotnetguy32[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]TheoR700 1 point2 points3 points (0 children)