NeoNmaN
04-30-2008, 12:59 AM
I use linq for to pull my data out from the data base, this goes well-corpses well in for I actually push into that problem where I have to about tjecche there, have pulled reached out or not, because unless it's there has to be made an output for the user that it has happened mistakes otherwise it's of course just to drive through.
are there some are here in there know how it can/has to be done?
sample:
var adminAccount = ( from p in db.Accounts
where p.AccountUser == _strUsername( )
select new { p.AccountUser, p.AccountId } ).FirstOrDefault( );
if( adminAccount.AccountId )
{
lblLoginTekst.Text = adminAccount.AccountUser.ToString( ) + "<br />";
}
else
{
lblLoginTekst.Text = "Du har angivet forkert brugernavn eller kodeord!!!";
}
are there some are here in there know how it can/has to be done?
sample:
var adminAccount = ( from p in db.Accounts
where p.AccountUser == _strUsername( )
select new { p.AccountUser, p.AccountId } ).FirstOrDefault( );
if( adminAccount.AccountId )
{
lblLoginTekst.Text = adminAccount.AccountUser.ToString( ) + "<br />";
}
else
{
lblLoginTekst.Text = "Du har angivet forkert brugernavn eller kodeord!!!";
}