public PRepo(Pcontext context) { this.context = context; jsonsettings = new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore, Error = (sender, args) => { args.ErrorContext.Handled = true; }, }; }
public ARepo(Pcontext context) { this.context = context; this.context.Database.EnsureCreated(); this.jsonsettings = new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore, Error = (sender, args) => { args.ErrorContext.Handled = true; }, }; }
public void Setup() { context = new Pcontext(); repo = new ARepo(context); jsonsettings = new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore, Error = (sender, args) => { args.ErrorContext.Handled = true; }, }; }