Hi experts,
I have this rather stupid question yet I duno the answer. Hope someone can let me know the answer :
- public AzolaDL.Account getAccount(string userName, string type){
- AzolaDL.Account account = new AzolaDL.Account();
- try{
- account = db.Accounts.First(e => e.userName == userName && e.type == type);
- }catch (Exception e){
- return null;
- }
- return account;
- }
Can I know why do we need to put .First ?