public void TestGetAll() { var repo = new DisciplineRepository(); var d = repo.GetAll(); Assert.IsTrue(d.Count > 0); var x = repo.GetFromTop(1); Assert.IsTrue(x.Count > 0); }
private void getData() { var repository = new DisciplineRepository(); //po odkomentowaniu nastepnej linijki sie wysypuje var disciplines = repository.GetAll(); foreach (Discipline discipline in disciplines) { DisciplineItem tmp = new DisciplineItem(discipline); tmp.MouseUp += new MouseEventHandler(Discipline_Click); this.disciplinesPanel.Controls.Add(tmp); } }
public void TestDbAccess() { using (var session = HibernateConfiguration.GetSession()) { var d = new Discipline(); var repo = new DisciplineRepository(); d.Name = "Football"; if (!repo.ContainsName(d.Name)) { repo.SaveOrUpdate(d); } var result = repo.GetAll(); Assert.IsTrue(result.Count > 0); } }
public void TestDbAccess() { using (var session = HibernateConfiguration.GetSession()) { var d = new Discipline(); var repo = new DisciplineRepository(); d.Name = "Football"; if(!repo.ContainsName(d.Name)) repo.SaveOrUpdate(d); var result = repo.GetAll(); Assert.IsTrue(result.Count > 0); } }
public IEnumerable <DisciplineModel> GetAll() { var data = _repository.GetAll(); return(data); }
public IEnumerable <Discipline> GetAllDisciplines() { return(_repository.GetAll()); }