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)); } }
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)); } }
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)); } }
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)); }