ajout d'une ligne pour comprendre DI

master
Chloé MOURGAND 3 years ago
parent 01eb272bcc
commit c9ecea0c02

@ -9,6 +9,7 @@ using MyFirstBlazor.Data;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
// Add services to the container. // Add services to the container.
//builder is the 'assembleur'
builder.Services.AddRazorPages(); builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor(); builder.Services.AddServerSideBlazor();
builder.Services.AddSingleton<WeatherForecastService>(); builder.Services.AddSingleton<WeatherForecastService>();

Loading…
Cancel
Save