Reputation: 10296
I have a linqtosql dbml where I dropped a stored procedure into the designer interface.
Stored procedure name: GetUser(@userid int)
Select * from users_tbl where userid=@userid
Now in the code I want to do something like this:
Dim db as new UserDataContext
Dim myuser as users_tbl = db.GetUser(1)
How can I tell if GetUser returned a user or not?
Upvotes: 0
Views: 122
Reputation: 25652
If it returns a record, users_tbl
will not be null
and will not have a .Count()
of 0.
Upvotes: 1