コード例 #1
0
 public Account GetByUsername(string username)
 {
     using (var ctx = new LeaveAnnualContext())
     {
         return ctx.Accounts.ToList().Find(e => e.Username.Equals(username));
     }
 }
コード例 #2
0
 public Account Get(int id)
 {
     using (var ctx = new LeaveAnnualContext())
     {
         return ctx.Accounts.ToList().Find(e => e.AccountId == id);
     }
 }