public static ExpectedResult IncludeExpectedResultType(this ExpectedResult expectedResult, IExpectedResultTypeRepository expectedResultTypeRepository) { if (expectedResult.ExpectedResultType != null) return expectedResult; expectedResult.ExpectedResultType = expectedResultTypeRepository.GetDataById((int) expectedResult.ExpectedResultTypeId).ToList().First(); return expectedResult; }
public static ExpectedResult IncludeExpectedResultType(this ExpectedResult expectedResult, IExpectedResultTypeRepository expectedResultTypeRepository) { if (expectedResult.ExpectedResultType != null) { return(expectedResult); } expectedResult.ExpectedResultType = expectedResultTypeRepository.GetDataById((int)expectedResult.ExpectedResultTypeId).ToList().First(); return(expectedResult); }
public IQueryable <ExpectedResultType> GetDataById(int id) { return(_dbRepository.GetDataById(id).AsQueryable()); }
public ActionResult Details(int id) { return(View(_dbExpectedResultTypeRepository.GetDataById(id).FirstOrDefault())); }