From 81c1fc0c14253457c3c4fc24735e787ace1db70b Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Tue, 30 May 2023 07:18:47 +0300 Subject: Add index razor page --- Pages/Shared/_Projects.cshtml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Pages/Shared/_Projects.cshtml (limited to 'Pages/Shared/_Projects.cshtml') diff --git a/Pages/Shared/_Projects.cshtml b/Pages/Shared/_Projects.cshtml new file mode 100644 index 0000000..4b9a62e --- /dev/null +++ b/Pages/Shared/_Projects.cshtml @@ -0,0 +1,39 @@ +@using System.Globalization +@using Microsoft.EntityFrameworkCore +@using MyDarling.Models +@inject DataContext context + +@{ + var bundles = context.UnderwearBundles + .Include(b => b.Figures) + .Where(b => b.Price != 0 && b.Figures.Count > 0) + .OrderByDescending(b => b.Id); +} + +
+
+
+ @foreach (var bundle in bundles) + { +
+
+ @bundle.Name + @for (int i = 1; i < @bundle.Figures.Count(); i++) + { + + } +
+
+
@bundle.Name
+ @String.Format(new CultureInfo("ru-RU"), "{0:C0}", @bundle.Price) +
+
+
+
+ } +
+
+
\ No newline at end of file -- cgit v1.2.3