예제 #1
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));
     }
 }
예제 #2
0
 public void WithBranch(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));
     }
 }
예제 #3
0
 public void WithDealer(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));
     }
 }
예제 #4
0
 public IEnumerable <Worker> Execute()
 {
     return(_dataBaseSqlServerOrmLite.FindExpressionVisitor(_query));
 }
 public IEnumerable <SaucerConfiguration> Execute()
 {
     return(_dataBaseSqlServerOrmLite.FindExpressionVisitor(_query));
 }
 public IEnumerable <ReservationDetail> Execute()
 {
     return(_dataBaseSqlServerOrmLite.FindExpressionVisitor(_query));
 }
 public IEnumerable <SaucerMultimedia> Execute()
 {
     return(_dataBaseSqlServerOrmLite.FindExpressionVisitor(_query));
 }
 public IEnumerable <IngredientGroup> Execute()
 {
     return(_dataBaseSqlServerOrmLite.FindExpressionVisitor(_query));
 }