User1622294484 posted
Hey guys ,
I'm trying to write a code wich search if the pseudo of the user exists in the DB, if yes I want to get his name but it seems not working ,here is my code
using (nEntities ctx = new nEntities())
{
try
{
authentification t = (from t1 in ctx.authentification
where ((t1.pseudo == TextBox1.Text) & (t1.passwd== TextBox2.Text))
select t1).First();
if (t.pseudo != TextBox1.Text)
{
a = false;
//type = t.type;
}
else
{
a = true;
nom = t.name;
}
}
catch
{
}
}
so the problem iswhen I affect nom=t.name it underlines it in red .why ?