diff --git a/MyWebsite/MyWebsite/Controllers/HomeController.cs b/MyWebsite/MyWebsite/Controllers/HomeController.cs index fc1021d..78762ab 100644 --- a/MyWebsite/MyWebsite/Controllers/HomeController.cs +++ b/MyWebsite/MyWebsite/Controllers/HomeController.cs @@ -19,11 +19,11 @@ namespace MyWebsite.Controllers [Route("Projects")] public IActionResult Projects() => - View(); + View(Startup.Database.Projects.OrderByDescending(i => i.Id)); [Route("Error")] [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public IActionResult Error() => - View("Views/Shared/Error.cshtml", new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); + View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); } } \ No newline at end of file diff --git a/MyWebsite/MyWebsite/Models/Project.cs b/MyWebsite/MyWebsite/Models/Project.cs index a4d05ce..45dcc02 100644 --- a/MyWebsite/MyWebsite/Models/Project.cs +++ b/MyWebsite/MyWebsite/Models/Project.cs @@ -16,8 +16,6 @@ namespace MyWebsite.Models [Column(TypeName = "text")] public string Description { get; set; } - [Column(TypeName = "varchar(50)")] - public string ImageName { get; set; } [Column(TypeName = "varchar(50)")] public string Link { get; set; } [Column(TypeName = "varchar(50)")] diff --git a/MyWebsite/MyWebsite/Program.cs b/MyWebsite/MyWebsite/Program.cs index f74053d..71fb392 100644 --- a/MyWebsite/MyWebsite/Program.cs +++ b/MyWebsite/MyWebsite/Program.cs @@ -1,11 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; namespace MyWebsite { diff --git a/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml b/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml index 7438a41..ab7ee1e 100644 --- a/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml +++ b/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml @@ -4,7 +4,9 @@ }
-

Back to gallery

+

+  Back to gallery +

@@ -20,17 +22,14 @@
+