how to pass a parameter safely into linq to sql
        Posted  
        
            by Blankman
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Blankman
        
        
        
        Published on 2010-04-08T19:54:37Z
        Indexed on 
            2010/04/08
            20:03 UTC
        
        
        Read the original article
        Hit count: 259
        
linq-to-sql
|c#
If I want to get a user that has the email address of '[email protected]', how do I pass that as a parameter in linq?
ie.:
var a = from u in Users
        where u.Email = @email
        Select u;
So this would be used in my method:
public static GetuserByEmail(string email)
Do I just pass in the variable or?
© Stack Overflow or respective owner