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)); } }
public IEnumerable <Players> GetPlayers() { using (UEFA_DBEntities db = new UEFA_DBEntities()) { db.Configuration.LazyLoadingEnabled = false; return(db.Players.ToList()); } }