I am relatively new to LINQ queries as I normally just use plain SQL to get my data back but i am changing for the good - Anyway obviously with SQL you pass in parameters so you do not get any SQL injections etc. Now the LINQ query I have written I think is safe but I am thinking it may be able to done a little easier and more efficient.
So I am passing in my data in the query from the model which is being sent from the view and my tables columns are being called from the ProjectLinqDataContext
class. Is this safe? is there anything which I am doing which is not best practice.
var context = new ProjectLinqDataContext();
var user = from y in context.Customers
where y.CustomerUsername == model.Email && y.CustomerPassword == model.Password
select y;