How to fix Error CS0029 Cannot implicitly convert type 'void' to 'System.Collections.Generic.List

Gbenga Banuso Odumosu 40 Reputation points
2024-05-07T00:20:57.27+00:00
var user = from u in conn.Table
Developer technologies | .NET | .NET MAUI
Developer technologies | C#
0 comments No comments
{count} votes

Accepted answer
  1. Alfredo Revilla - Upwork Top Talent | IAM SWE SWA 27,526 Reputation points Moderator
    2024-05-07T03:54:27.85+00:00

    Wait() returns void. Switch to:

    return await user.FirstOrDefaultAsync();
    

    Let me know if you need additional or more detailed guidance. If the answer was helpful, please accept it and rate it so that others facing a similar issue can easily find a solution.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.