I create a stored procedure name sp_Auth and inside it is
Table name UserAccounts with two fields, username and password both varchar(50)
I declared two variables, @username,@password on stored procedure
Select * From UserAccounts where @username = username and @password = password
After I create it I put it into Linq to SQL together with the table and then I create new class to call the stored procedure from the linq to sql class.
My question is how do I make a method in order for the button in my login form to check or validate username and password typed in the textboxes to the data found on the table using my stored procedure.
I know there are a lot of ways on doing this but I found out they uses sqlcommand or something.
I need to use the class to call the stored proc.
The code I want to achieve is like this
Public static sp_Insert(Product p) db = new dataclass1context(); db.storedprocInsert(@Name,@Pname); Can I create a validator or checker in the class like the code above?