public void CanIncludeNavigationProperties()
        {
            var results = _customerRepository.AllInclude(c => c.Orders);

            WriteLog();
            Assert.IsTrue(_log.Contains("Orders"));
            Assert.IsTrue(results.Any(c => c.Orders.Any()));
        }
        public void CanIncludeNavigationProperties()
        {
            var results = _stockItemRepository.AllInclude(c => c.ItemEntries);

            WriteLog();
            Assert.IsTrue(_log.Contains("ItemEntries"));
            Assert.IsTrue(results.Any(c => c.ItemEntries.Any()));
        }
        public void CanIncludeNavigationProperties()
        {
            var results = _dataStructureDataStructureRepository.AllInclude(c => c.DataRules);

            WriteLog();
            Assert.IsTrue(_log.Contains("DataStructure"));
            Assert.IsTrue(results.Any(c => c.DataRules.Any()));
        }
Beispiel #4
0
        public void GetAllIncludingComprehendsSingleNavigation()
        {
            var results = _customerRepository.AllInclude(c => c.Orders);

            Assert.IsTrue(results.Any(c => c.Orders.Any()));
        }
Beispiel #5
0
        public IEnumerable <TViewModel> ListWhere(Expression <Func <TModel, bool> > includeProperties)
        {
            IMapper iMapper = _config2.CreateMapper();

            return(repo.AllInclude(includeProperties).Select(c => iMapper.Map <TModel, TViewModel>(c)));
        }
Beispiel #6
0
 public IEnumerable <StockItem> GetStockItems()
 {
     return(_repository.AllInclude(s => s.ItemEntries));
 }
        public ActionResult Index()
        {
            var employees = _repo.AllInclude(e => e.Employee_ReportsTo, e => e.Territories);

            return(View(employees));
        }