static void Main(string[] args) { using (var ctx = new MinusContext()) { Product newProduct = new Product() { Name = "asd", Rating = 3.4, }; ctx.Products.Add(newProduct); ctx.SaveChanges(); } }
public override void ExitMinus([NotNull] MinusContext context) { base.ExitMinus(context); Log("ExitMinus"); if (phase == Phase.Building) { symbolTableCreator.ExitMinus(context); } else { symbolTableTraverser.ExitMinus(context); semanticErrorChecker.ExitMinus(context); } }
public RoleRepository(MinusContext context) { this.context = context; }
public CommentRepository(MinusContext context) { this.context = context; }
private PlusOrMinusContext plusOrMinus(int _p) { ParserRuleContext _parentctx = Context; int _parentState = State; PlusOrMinusContext _localctx = new PlusOrMinusContext(Context, _parentState); PlusOrMinusContext _prevctx = _localctx; int _startState = 4; EnterRecursionRule(_localctx, 4, RULE_plusOrMinus, _p); try { int _alt; EnterOuterAlt(_localctx, 1); { { _localctx = new ToMultOrDivContext(_localctx); Context = _localctx; _prevctx = _localctx; State = 31; multOrDiv(0); } Context.Stop = TokenStream.LT(-1); State = 41; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream, 3, Context); while (_alt != 2 && _alt != global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER) { if (_alt == 1) { if (ParseListeners != null) { TriggerExitRuleEvent(); } _prevctx = _localctx; { State = 39; ErrorHandler.Sync(this); switch (Interpreter.AdaptivePredict(TokenStream, 2, Context)) { case 1: { _localctx = new PlusContext(new PlusOrMinusContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_plusOrMinus); State = 33; if (!(Precpred(Context, 3))) { throw new FailedPredicateException(this, "Precpred(Context, 3)"); } State = 34; Match(PLUS); State = 35; multOrDiv(0); } break; case 2: { _localctx = new MinusContext(new PlusOrMinusContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_plusOrMinus); State = 36; if (!(Precpred(Context, 2))) { throw new FailedPredicateException(this, "Precpred(Context, 2)"); } State = 37; Match(MINUS); State = 38; multOrDiv(0); } break; } } } State = 43; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream, 3, Context); } } } catch (RecognitionException re) { _localctx.exception = re; ErrorHandler.ReportError(this, re); ErrorHandler.Recover(this, re); } finally { UnrollRecursionContexts(_parentctx); } return(_localctx); }
public MinusContext Init() { return(_dbContext ?? (_dbContext = new MinusContext())); }