Exemplo n.º 1
0
        public TEntity FirstOrDefault(Expression <Func <TEntity, bool> > filter, params Expression <Func <TEntity, object> >[] includes)
        {
            var sqlEntity = _sqlRepository.FirstOrDefault(filter, includes);

            if (sqlEntity == null)
            {
                sqlEntity = _mongoRepository.FirstOrDefault(filter);
            }

            return(sqlEntity);
        }
Exemplo n.º 2
0
        public Game FirstOrDefault(Expression <Func <Game, bool> > filter, params Expression <Func <Game, object> >[] includes)
        {
            var sqlEntity = _sqlGameRepository.FirstOrDefault(filter);

            if (sqlEntity == null)
            {
                sqlEntity = _mongoGameRepository.FirstOrDefault(filter);
            }

            return(sqlEntity);
        }
Exemplo n.º 3
0
 public ShipperModel GetShipperByName(string companyName)
 {
     return(_mongoRepository.FirstOrDefault(x => x.CompanyName == companyName));
 }