Added services in Program, agents appear normally

This commit is contained in:
Marc-André Descôteaux committed 2023-09-21 20:47:10 -04:00
1 parent 0c0392d0be
commit 19fa9ef333
4 files changed
+8 -11

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ var builder = WebApplication.CreateBuilder(args);
// Add services to the container. // Add services to the container.
builder.Services.AddControllersWithViews(); builder.Services.AddControllersWithViews();
builder.Services.AddSingleton<IRobotsService, NotEmptyRobotsService>(); builder.Services.AddSingleton<IRobotsService, NotEmptyRobotsService>();
builder.Services.AddSingleton<IAgentsService, AgentsService>(); builder.Services.AddSingleton<IAgentsService, NotEmptyAgentsService>();
var app = builder.Build(); var app = builder.Build();
// Configure the HTTP request pipeline. // Configure the HTTP request pipeline.
+5 -8
View File
@@ -14,17 +14,17 @@
<table class="table table-hover" style="width: 40%; margin-left: auto; margin-right: auto;"> <table class="table table-hover" style="width: 40%; margin-left: auto; margin-right: auto;">
<thead class="thead-dark"> <thead>
<tbody> <tbody>
<tr>
<th>Nom</th>
<td>@Model.Name</td>
</tr>
<tr> <tr>
<th>Id</th> <th>Id</th>
<td>@Model.Id</td> <td>@Model.Id</td>
</tr> </tr>
<tr>
<th>Nom</th>
<td>@Model.Name</td>
</tr>
<tr> <tr>
<th>Continent</th> <th>Continent</th>
@@ -35,6 +35,3 @@
</tbody> </tbody>
</table> </table>
+1 -1
View File
@@ -1,5 +1,5 @@
@{ @{
ViewData["Title"] = "Home Page"; ViewData["Title"] = "Agent List";
} }
@model List<Agent> @model List<Agent>
+1 -1
View File
@@ -14,7 +14,7 @@
<table class="table table-hover" style="width: 40%; margin-left: auto; margin-right: auto;"> <table class="table table-hover" style="width: 40%; margin-left: auto; margin-right: auto;">
<thead class="thead-dark"> <thead>
<tbody> <tbody>
<tr> <tr>
<th>Nom</th> <th>Nom</th>