//Get land by name public LandModel GetLandModelByName(string name) { using (OSMEntities3 db = new OSMEntities3()) { return InstantiateModel(db.Lands.SingleOrDefault(x => x.Naam.Equals(name))); } }
/// <summary> /// Get CompetitieModel by Land id /// </summary> /// <returns></returns> public CompetitieModel GetCompetitieByLandID(int argLandId) { using (OSMEntities3 db = new OSMEntities3()) { return InstantiateModel(db.Competities.SingleOrDefault(x => x.LandLand_Code.Equals(argLandId))); } }
//Get Land by db Id public LandModel GetLandModel(int id) { using (OSMEntities3 db = new OSMEntities3()) { return InstantiateModel(db.Lands.SingleOrDefault(x => x.Land_Code.Equals(id))); } }
/// <summary> /// Get competitie by id. /// </summary> /// <param name="id"></param> /// <returns></returns> public CompetitieModel GetCompetitieModel(int id) { using (OSMEntities3 db = new OSMEntities3()) { return InstantiateModel(db.Competities.SingleOrDefault(x => x.Competitie_ID.Equals(id))); } }
public ManagerModel GetManagerModel(int id) { using (OSMEntities3 db = new OSMEntities3()) { return InstantiateModel(db.Managers.SingleOrDefault(x => x.Manager_ID.Equals(id))); } }
public AchievementModel GetAchievementModel(int id) { using (OSMEntities3 db = new OSMEntities3()) { return InstantiateModel(db.Achievements.SingleOrDefault(x => x.Achievement_ID.Equals(id))); } }
/// <summary> /// Get ClubModel by LandId /// </summary> /// <param name="id"></param> /// <returns></returns> public ClubModel GetClubModelByLandId(int id) { using (OSMEntities3 db = new OSMEntities3()) { return InstantiateModel(db.Clubs.SingleOrDefault(x => x.LandLand_Code.Equals(id))); } }
/// <summary> /// Get all the land models /// </summary> /// <returns></returns> public List<LandModel> GetAllLandModels() { List<LandModel> landModelList = new List<LandModel>(); using (OSMEntities3 db = new OSMEntities3()) { var landList = db.Lands.ToList(); for (int i = 0; i < landModelList.Count; ++i) { landModelList.Add(InstantiateModel(landList[i])); } } return landModelList; }
public List<CompetitieModel> GetAllCompetitieModels() { List<CompetitieModel> competitieModelList = new List<CompetitieModel>(); using (OSMEntities3 db = new OSMEntities3()) { var compitieList = db.Competities.ToList(); for (int i = 0; i < compitieList.Count; ++i) { competitieModelList.Add(InstantiateModel(compitieList[i])); } } return competitieModelList; }
public List<ManagerModel> GetAllManagerModels() { List<ManagerModel> managerModelList = new List<ManagerModel>(); using (OSMEntities3 db = new OSMEntities3()) { var managerList = db.Managers.ToList(); for (int i = 0; i < managerList.Count; ++i) { managerModelList.Add(InstantiateModel(managerList[i])); } } return managerModelList; }
public List<AchievementModel> GetAllAchievementModels() { List<AchievementModel> achievementModelList = new List<AchievementModel>(); using (OSMEntities3 db = new OSMEntities3()) { var achievementList = db.Achievements.ToList(); for (int i = 0; i < achievementList.Count; ++i) { achievementModelList.Add(InstantiateModel(achievementList[i])); } } return achievementModelList; }
/// <summary> /// Used to retrieve all the ClubModel from the club table. /// </summary> /// <returns></returns> public List<ClubModel> GetAllClubModels() { List<ClubModel> clubModelList = new List<ClubModel>(); using (OSMEntities3 db = new OSMEntities3()) { var clubList = db.Clubs.ToList(); for (int i = 0; i < clubList.Count; ++i) { clubModelList.Add(InstantiateModel(clubList[i])); } } return clubModelList; }