Example #1
0
 public Players GetPlayer(int id)
 {
     using (UEFA_DBEntities db = new UEFA_DBEntities())
     {
         db.Configuration.ProxyCreationEnabled = false;
         return(db.Players.Include("Nation").FirstOrDefault(p => p.Player_ID == id));
     }
 }
Example #2
0
 public IEnumerable <Players> GetPlayers()
 {
     using (UEFA_DBEntities db = new UEFA_DBEntities())
     {
         db.Configuration.LazyLoadingEnabled = false;
         return(db.Players.ToList());
     }
 }