diff --git a/nrdkwebsite/Pages/index.cshtml b/nrdkwebsite/Pages/index.cshtml index 0f7b1f1..e4de078 100644 --- a/nrdkwebsite/Pages/index.cshtml +++ b/nrdkwebsite/Pages/index.cshtml @@ -1,9 +1,10 @@ @page @model IndexModel @{ - ViewData["Title"] = "home page"; + ViewData["Title"] = "Home page"; } +

Привет, это сайт neroduckale

Мой никнейм читается по разному - неродакля, неродукель, неродакале, но одно в нем остается неизменным - неро.

спасибо мактайлорс за помощь с созданием сайта. version: 0.3 diff --git a/nrdkwebsite/Pages/layout.cshtml b/nrdkwebsite/Pages/layout.cshtml index 9a8829f..4050af7 100644 --- a/nrdkwebsite/Pages/layout.cshtml +++ b/nrdkwebsite/Pages/layout.cshtml @@ -9,24 +9,21 @@ - + @* *@ - @* *@ - +
- +
diff --git a/nrdkwebsite/Pages/users.cshtml b/nrdkwebsite/Pages/users.cshtml index 5c27c68..3ddda27 100644 --- a/nrdkwebsite/Pages/users.cshtml +++ b/nrdkwebsite/Pages/users.cshtml @@ -1,23 +1,16 @@ @page +@using System.Collections @model Users -Всего в таблице записей: -
- - - -
АйдиНикнеймМасть
Loading...Loading...Loading...
-
+ + + + +
текст заголовкатекст заголовка
данныеданные
\ No newline at end of file diff --git a/nrdkwebsite/Program.cs b/nrdkwebsite/Program.cs index 860cee6..214ab99 100644 --- a/nrdkwebsite/Program.cs +++ b/nrdkwebsite/Program.cs @@ -45,8 +45,9 @@ app.MapDelete("/api/users/{id:int}", async (int id, DatabaseHandler db) => { await db.SaveChangesAsync(); return Results.Json(user); }); //WORKS -app.MapPost("/api/users", async (NewUser newuser, DatabaseHandler db) => { - User user = new User(newuser.nickname, db.users.Count() + 1, newuser.mast); +app.MapPost("/api/users", async (User user, DatabaseHandler db)=> +{ + user.id = db.users.Count() + 1; await db.users.AddAsync(user); await db.SaveChangesAsync(); return user; diff --git a/nrdkwebsite/User.cs b/nrdkwebsite/User.cs index 5c22109..7354bb5 100644 --- a/nrdkwebsite/User.cs +++ b/nrdkwebsite/User.cs @@ -12,15 +12,4 @@ public class User this.id = id; this.mast = mast; } -} -public class NewUser -{ - public string nickname { get; set; } - public string mast { get; set; } - - public NewUser(string nickname, string mast) - { - this.nickname = nickname; - this.mast = mast; - } } \ No newline at end of file diff --git a/nrdkwebsite/wwwroot/css/style.css b/nrdkwebsite/wwwroot/css/style.css index fc07fc8..03cd81f 100644 --- a/nrdkwebsite/wwwroot/css/style.css +++ b/nrdkwebsite/wwwroot/css/style.css @@ -15,13 +15,10 @@ a { .header-links { /*