Пример #1
0
 public PRepo(Pcontext context)
 {
     this.context = context;
     jsonsettings = new JsonSerializerSettings()
     {
         ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
         Error = (sender, args) =>
         {
             args.ErrorContext.Handled = true;
         },
     };
 }
Пример #2
0
 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;
         },
     };
 }
Пример #3
0
 public void Setup()
 {
     context      = new Pcontext();
     repo         = new ARepo(context);
     jsonsettings = new JsonSerializerSettings()
     {
         ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
         Error = (sender, args) =>
         {
             args.ErrorContext.Handled = true;
         },
     };
 }