Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //performance Impact : high
- //EntityFramwork.account account = conn.accounts.Where(x => x.Username == username)
- //.FirstOrDefault();
- //performance Impact : low
- var query = from c in conn.accounts
- where c.Username == username
- select c;
- EntityFramwork.account account = query.FirstOrDefault();
- if (account != null)
- {
- exists = true;
- this.Password = account.Password;
- this.IP = account.IP;
- this.EntityID = (uint)account.EntityID;
- this.State = (AccountState)account.State;
- this.Email = account.Email;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement