Added services in Program, agents appear normally
This commit is contained in:
1 parent
0c0392d0be
commit
19fa9ef333
4 files changed
+9
-12
No files matched your search
@@ -5,7 +5,7 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllersWithViews();
|
||||
builder.Services.AddSingleton<IRobotsService, NotEmptyRobotsService>();
|
||||
builder.Services.AddSingleton<IAgentsService, AgentsService>();
|
||||
builder.Services.AddSingleton<IAgentsService, NotEmptyAgentsService>();
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
|
||||
@@ -14,18 +14,18 @@
|
||||
|
||||
<table class="table table-hover" style="width: 40%; margin-left: auto; margin-right: auto;">
|
||||
|
||||
<thead class="thead-dark">
|
||||
<thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>@Model.Id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<td>@Model.Name</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>@Model.Id</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Continent</th>
|
||||
<td>@Model.Continent</td>
|
||||
@@ -35,6 +35,3 @@
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
ViewData["Title"] = "Agent List";
|
||||
}
|
||||
@model List<Agent>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<table class="table table-hover" style="width: 40%; margin-left: auto; margin-right: auto;">
|
||||
|
||||
<thead class="thead-dark">
|
||||
<thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
|
||||
Reference in new issue
Block a user