public void Setup() { var options = new DbContextOptionsBuilder <ShiftContext>() .UseInMemoryDatabase(databaseName: "ShifttDatabase") .Options; // Insert seed data into the database using one instance of the context shiftContext = new ShiftContext(options); shiftContext.Shifts.Add(new Shift { id = 1, employeeSlots = 6, shiftDate = DateTime.Now, workingEmployees = new List <User>() { new User(1, "Dave", 1), new User(2, "Steve", 1) } }); shiftContext.Shifts.Add(new Shift { id = 2, employeeSlots = 6, shiftDate = DateTime.Now, workingEmployees = new List <User>() { new User(1, "Dave", 2), new User(2, "Steve", 2), new User(3, "Lisa", 2) } }); shiftContext.Shifts.Add(new Shift { id = 3, employeeSlots = 6, shiftDate = DateTime.Now, workingEmployees = new List <User>() }); shiftContext.SaveChanges(); shiftManager = new ShiftManager(shiftContext); shiftController = new ShiftController(shiftManager); }
public override object VisitShift([NotNull] ShiftContext context) { string result = "..."; int n = int.Parse(context.NUMBER().ToString()); switch (context.op.Type) { case SHIFT_LEFT: result = sh_left(Visit(context.expression()).ToString(), n); break; case SHIFT_RIGHT: result = sh_right(Visit(context.expression()).ToString(), n); break; } return(result); }
public CentroCustoRepository(ShiftContext context) : base(context) { }
public ClaimValueRepository(ShiftContext context) : base(context) { }
public UnitOfWork(ShiftContext context) { _context = context; }
public DCShiftsController(ShiftContext context) { _context = context; _calc = new RotationCalculator(); }
public OrdemServicoRepository(ShiftContext context) { Context = context; DbSet = Context.Set <OrdemServico>(); }
public DaycareSelectorController(ShiftContext context) { _context = context; }
public MedicoRepository(ShiftContext context) { Context = context; DbSet = Context.Set <Medico>(); }
public ClasseContabilRepository(ShiftContext context) : base(context) { }
public PostoColetaRepository(ShiftContext context) { Context = context; DbSet = Context.Set <PostoColeta>(); }
public ShiftManager(ShiftContext shiftContext) { _shiftContext = shiftContext; }
public GrupoRepository(ShiftContext context) : base(context) { }
public SituacaoRepository(ShiftContext context) : base(context) { }
public Repository(ShiftContext context) { Db = context; DbSet = Db.Set <TEntity>(); }
public ShiftsController(ShiftContext context, AvailabilityContext availabilityContext) { _context = context; _availabilityContext = availabilityContext; }
public PacienteRepository(ShiftContext context) { Context = context; DbSet = Context.Set <Paciente>(); }
public TipoBloqueioRepository(ShiftContext context) : base(context) { }
private ExpressionContext expression(int _p) { ParserRuleContext _parentctx = _ctx; int _parentState = State; ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); ExpressionContext _prevctx = _localctx; int _startState = 2; EnterRecursionRule(_localctx, 2, RULE_expression, _p); int _la; try { int _alt; EnterOuterAlt(_localctx, 1); { State = 27; _errHandler.Sync(this); switch (_input.La(1)) { case SHIFT_RIGHT: case SHIFT_LEFT: { _localctx = new ShiftContext(_localctx); _ctx = _localctx; _prevctx = _localctx; State = 10; ((ShiftContext)_localctx).op = _input.Lt(1); _la = _input.La(1); if (!(_la == SHIFT_RIGHT || _la == SHIFT_LEFT)) { ((ShiftContext)_localctx).op = _errHandler.RecoverInline(this); } else { if (_input.La(1) == TokenConstants.Eof) { matchedEOF = true; } _errHandler.ReportMatch(this); Consume(); } State = 11; Match(NUMBER); State = 12; expression(6); } break; case UPPER: case LOWER: { _localctx = new CaseContext(_localctx); _ctx = _localctx; _prevctx = _localctx; State = 13; ((CaseContext)_localctx).op = _input.Lt(1); _la = _input.La(1); if (!(_la == UPPER || _la == LOWER)) { ((CaseContext)_localctx).op = _errHandler.RecoverInline(this); } else { if (_input.La(1) == TokenConstants.Eof) { matchedEOF = true; } _errHandler.ReportMatch(this); Consume(); } State = 14; expression(5); } break; case SUBSTRING: { _localctx = new SubstringContext(_localctx); _ctx = _localctx; _prevctx = _localctx; State = 15; Match(SUBSTRING); State = 16; Match(NUMBER); State = 19; _errHandler.Sync(this); _la = _input.La(1); if (_la == COMMA) { { State = 17; Match(COMMA); State = 18; Match(NUMBER); } } State = 21; expression(4); } break; case OBRACKET: { _localctx = new BracketsContext(_localctx); _ctx = _localctx; _prevctx = _localctx; State = 22; Match(OBRACKET); State = 23; expression(0); State = 24; Match(CBRACKET); } break; case STRING: { _localctx = new StringContext(_localctx); _ctx = _localctx; _prevctx = _localctx; State = 26; Match(STRING); } break; default: throw new NoViableAltException(this); } _ctx.stop = _input.Lt(-1); State = 34; _errHandler.Sync(this); _alt = Interpreter.AdaptivePredict(_input, 3, _ctx); while (_alt != 2 && _alt != global::Antlr4.Runtime.Atn.ATN.InvalidAltNumber) { if (_alt == 1) { if (_parseListeners != null) { TriggerExitRuleEvent(); } _prevctx = _localctx; { { _localctx = new Con_diffContext(new ExpressionContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_expression); State = 29; if (!(Precpred(_ctx, 3))) { throw new FailedPredicateException(this, "Precpred(_ctx, 3)"); } State = 30; ((Con_diffContext)_localctx).op = _input.Lt(1); _la = _input.La(1); if (!(_la == CONCANTENATE || _la == DIFFERENCE)) { ((Con_diffContext)_localctx).op = _errHandler.RecoverInline(this); } else { if (_input.La(1) == TokenConstants.Eof) { matchedEOF = true; } _errHandler.ReportMatch(this); Consume(); } State = 31; expression(4); } } } State = 36; _errHandler.Sync(this); _alt = Interpreter.AdaptivePredict(_input, 3, _ctx); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.ReportError(this, re); _errHandler.Recover(this, re); } finally { UnrollRecursionContexts(_parentctx); } return(_localctx); }
public ConvenioRepository(ShiftContext context) { Context = context; DbSet = Context.Set <Convenio>(); }
public EmpresaRepository(ShiftContext context) : base(context) { }
public LogAuditoriaRepository(ShiftContext context) : base(context) { }
public ExameRepository(ShiftContext context) { Context = context; DbSet = Context.Set <Exame>(); }