コード例 #1
0
        public void Executar(ConfiguracaoDeLoteCef configuracaoDeLoteCef)
        {
            Contexto.LotesCef.Clear();
            var lotesCef = this.loteCefRepositorio.ObterAbertos(configuracaoDeLoteCef);

            while (lotesCef.Count < 1)
            {
                var novoLote = LoteCef.Novo();
                this.loteCefRepositorio.Salvar(novoLote);

                lotesCef.Add(novoLote);
            }

            foreach (var loteCef in lotesCef)
            {
                this.AdicionaNoContexto(loteCef.Id, loteCef.QuantidadeDeLotes);
            }
        }
コード例 #2
0
 public IList <LoteCef> ObterAbertos(ConfiguracaoDeLoteCef configuracao)
 {
     return(this.Session.QueryOver <LoteCef>()
            .Where(x => x.Status == LoteCefStatus.Aberto)
            .List());
 }