Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Linq in .NET Handlers

Tags:

linq

ashx

I have a Handler and I am trying to perform LINQ operations. However I cannot. Is it possible to do this in .ASHX files?

using (UserDataContext userDataContext = new UserDataContext)
{
    User user = userDataContext.Users.Single -- Does not show up as an option in intellisense.
}

Thanks

like image 806
Peuge Avatar asked Dec 05 '25 16:12

Peuge


1 Answers

Have you added import?

using System.Linq;
like image 80
decyclone Avatar answered Dec 08 '25 19:12

decyclone