Esempio n. 1
0
 public void WithoutBranch(int branchId)
 {
     if (branchId.IsNotZero())
     {
         var branchDealerQuery = new SqlServerExpressionVisitor <BranchDealer>();
         branchDealerQuery.Where(branchDealer => branchDealer.BranchId == branchId);
         var dealerIds = _dataBaseSqlServerOrmLite.FindExpressionVisitor(branchDealerQuery).Select(branchDealer => branchDealer.DealerId);
         dealerIds = dealerIds.Count().IsNotZero() ? dealerIds : new[] { int.MinValue };
         _query.Where(dealer => !Sql.In(dealer.Id, dealerIds));
     }
 }
Esempio n. 2
0
 public void WithPermission(int permissionId)
 {
     if (permissionId.IsNotZero())
     {
         var permissionAccessLevelQuery = new SqlServerExpressionVisitor <PermissionAccessLevel>();
         permissionAccessLevelQuery.Where(permissionAccessLevel => permissionAccessLevel.PermissionId == permissionId);
         var accessLevelIds = _dataBaseSqlServerOrmLite.FindExpressionVisitor(permissionAccessLevelQuery).Select(permissionAccessLevel => permissionAccessLevel.AccessLevelId);
         accessLevelIds = accessLevelIds.Count().IsNotZero() ? accessLevelIds : new[] { int.MinValue };
         _query.Where(accessLevel => Sql.In(accessLevel.Id, accessLevelIds));
     }
 }
Esempio n. 3
0
 public void WithoutDealer(int dealerId)
 {
     if (dealerId.IsNotZero())
     {
         var dealerSaucerQuery = new SqlServerExpressionVisitor <DealerSaucer>();
         dealerSaucerQuery.Where(dealerSaucer => dealerSaucer.DealerId == dealerId);
         var saucerIds = _dataBaseSqlServerOrmLite.FindExpressionVisitor(dealerSaucerQuery).Select(dealerSaucer => dealerSaucer.SaucerId);
         saucerIds = saucerIds.Count().IsNotZero() ? saucerIds : new[] { int.MinValue };
         _query.Where(saucer => !Sql.In(saucer.Id, saucerIds));
     }
 }
 public RegionQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <Region>();
 }
Esempio n. 5
0
 public CompanyQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <Company>();
 }
 public SaucerConfigurationQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <SaucerConfiguration>();
 }
        public IEnumerable <T> FindExpressionVisitor <T>(SqlServerExpressionVisitor <T> sqlExpressionVisitor) where T : new()
        {
            var items = DbConnection.Select(sqlExpressionVisitor);

            return(items);
        }
        public int Count <T>(SqlServerExpressionVisitor <T> sqlExpressionVisitor) where T : new()
        {
            var totalCount = DbConnection.Count(sqlExpressionVisitor);

            return(Convert.ToInt32(totalCount));
        }
Esempio n. 9
0
 public WarningQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <Warning>();
 }
 public ReservationDetailQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <ReservationDetail>();
 }
 public DiseaseQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <Disease>();
 }
 public BranchQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <Branch>();
 }
Esempio n. 13
0
 public DepartmentQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <Department>();
 }
 public SaucerMultimediaQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <SaucerMultimedia>();
 }
Esempio n. 15
0
 public IngredientQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <Ingredient>();
 }
Esempio n. 16
0
 public JobQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <Job>();
 }
 public WorkerQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <Worker>();
 }
Esempio n. 18
0
 public AccessLevelQuery(IDataBaseSqlServerOrmLite dataBaseSqlServerOrmLite)
 {
     _dataBaseSqlServerOrmLite = dataBaseSqlServerOrmLite;
     _query = new SqlServerExpressionVisitor <AccessLevel>();
 }