public void GetStudentDeclaration() { var repo = new StudentDeclarationRepository(_context); var results = repo.Find(t => t.DeclarationJiaoWu.SchoolYearTerm.Year == "2013-2014" && t.DeclarationJiaoWu.SchoolYearTerm.Term == "2"); Assert.IsTrue(results.Count() > 0); }
public void DeclarationCountOfStudentDeclaration() { var repo = new StudentDeclarationRepository(_context); var decls = repo.Find(t => t.DeclarationJiaoWu.SchoolYearTerm.Year == "2013-2014" && t.DeclarationJiaoWu.SchoolYearTerm.Term == "2" ); var result = decls.Sum(t => t.DeclarationJiaoWu.DeclarationCount); Assert.IsTrue(result > 0); }
public void GetStudentDeclaration_FromStudentDeclarationJiaoWu() { var repo = new StudentDeclarationRepository(_context); var decls = repo.Find(t => t.DeclarationJiaoWu.SchoolYearTerm.Year == "2013-2014" && t.DeclarationJiaoWu.SchoolYearTerm.Term == "2" ).Select(d => d.DeclarationJiaoWu); var result = decls.Sum(t => t.DeclarationCount); Assert.IsTrue(result > 0); }