Changeset 1db5673 for Farmatiko/Startup.cs
- Timestamp:
- 11/14/20 12:27:30 (4 years ago)
- Branches:
- master
- Children:
- 68454c6
- Parents:
- ad60966
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/Startup.cs
rad60966 r1db5673 18 18 using FarmatikoServices.Infrastructure; 19 19 using System; 20 20 using Newtonsoft.Json.Serialization; 21 21 namespace Farmatiko 22 22 { … … 45 45 46 46 services.AddControllersWithViews(); 47 services.AddControllersWithViews().AddNewtonsoftJson(options => options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore); 47 48 // In production, the Angular files will be served from this directory 48 49 services.AddSpaStaticFiles(configuration => … … 53 54 services.AddEntityFrameworkNpgsql().AddDbContext<FarmatikoDataContext>(opt => opt.UseNpgsql(connectionString)); 54 55 55 services.Add Transient<IPHRepo, PHRepo>();56 services.AddScoped<IPHRepo, PHRepo>(); 56 57 services.AddTransient<IRepository, Repository>(); 57 58 services.AddTransient<IAdminRepo, AdminRepo>();
Note:
See TracChangeset
for help on using the changeset viewer.