Is my LINQ query safe and efficient?
Your ProjectLinqDataContext is disposable so make sure to wrap the usage in a using statement. Efficiency will be based on how your database is indexed. The query itself looks fine. You can also use method syntax for a more fluent and object oriented look. This doesn't affect anything, but I think it's much more readable.

using(var context = new ProjectLinqDataContext())
{
    var user = context.Customers.FirstOrDefault(y =&gt; y.CustomerUsername == model.Email &amp;&amp; y.CustomerPassword == model.Password);
    //do something with user if it's not null
}


Make sure your password has been hashed and salted of course.