Ignore:
Timestamp:
11/14/20 12:27:30 (2 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
68454c6
Parents:
ad60966
Message:

Fix bugs, add some more

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/Startup.cs

    rad60966 r1db5673  
    1818using FarmatikoServices.Infrastructure;
    1919using System;
    20 
     20using Newtonsoft.Json.Serialization;
    2121namespace Farmatiko
    2222{
     
    4545
    4646            services.AddControllersWithViews();
     47            services.AddControllersWithViews().AddNewtonsoftJson(options => options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore);
    4748            // In production, the Angular files will be served from this directory
    4849            services.AddSpaStaticFiles(configuration =>
     
    5354            services.AddEntityFrameworkNpgsql().AddDbContext<FarmatikoDataContext>(opt => opt.UseNpgsql(connectionString));
    5455
    55             services.AddTransient<IPHRepo, PHRepo>();
     56            services.AddScoped<IPHRepo, PHRepo>();
    5657            services.AddTransient<IRepository, Repository>();
    5758            services.AddTransient<IAdminRepo, AdminRepo>();
Note: See TracChangeset for help on using the changeset viewer.