Commit dd3d8e73 authored by Andres Käver's avatar Andres Käver
Browse files

redirect

parent e61fc53f
# DB stuff # DB stuff
Create simple application for recipe book.
Recipes, ingredients, amounts of ingredients in recipe.
Implement recalculation of amount for servings needed
(ie if recipe is for 5 people - how much of everything you need for 2 people).
Provide search functionality - recipe name, description, ingredients.
To be implemented as Razor Pages based Web app.
No ViewBags! Nullable Reference Types have to be enabled!
***Read this:*** ***Read this:***
https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli
......
...@@ -8,8 +8,20 @@ ...@@ -8,8 +8,20 @@
<h1>Index</h1> <h1>Index</h1>
<p> <p>
<a asp-page="Create">Create New</a> <a asp-page="Create">Create New</a>
</p> </p>
<form method="post">
<div class="form-group">
<label asp-for="RecipeId" class="control-label"></label>
<select asp-for="RecipeId" class ="form-control" asp-items="ViewBag.RecipeId"></select>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" />
</div>
</form>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
......
...@@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; ...@@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using DAL.App.EF; using DAL.App.EF;
using Domain; using Domain;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace WebApp.Pages.RecipeTags namespace WebApp.Pages.RecipeTags
{ {
...@@ -21,11 +22,23 @@ namespace WebApp.Pages.RecipeTags ...@@ -21,11 +22,23 @@ namespace WebApp.Pages.RecipeTags
public IList<RecipeTag> RecipeTag { get;set; } = default!; public IList<RecipeTag> RecipeTag { get;set; } = default!;
[BindProperty(SupportsGet = true)]
public int? RecipeId { get; set; }
public async Task OnGetAsync() public async Task OnGetAsync()
{ {
RecipeTag = await _context.RecipeTags ViewData["RecipeId"] = new SelectList(_context.Recipes, "Id", "Description", RecipeId);
var query = _context.RecipeTags
.Include(r => r.Recipe) .Include(r => r.Recipe)
.Include(r => r.Tag).ToListAsync(); .Include(r => r.Tag).AsQueryable();
if (RecipeId != null)
{
query = query.Where(m => m.RecipeId == RecipeId);
}
RecipeTag = await query.ToListAsync();
} }
} }
} }
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
@Html.DisplayFor(modelItem => item.Category!.Name) @Html.DisplayFor(modelItem => item.Category!.Name)
</td> </td>
<td> <td>
<a asp-page="/RecipeTags/Index" asp-route-RecipeId="@item.Id">Tags</a> |
<a asp-page="./Edit" asp-route-id="@item.Id">Edit</a> | <a asp-page="./Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-page="./Details" asp-route-id="@item.Id">Details</a> | <a asp-page="./Details" asp-route-id="@item.Id">Details</a> |
<a asp-page="./Delete" asp-route-id="@item.Id">Delete</a> <a asp-page="./Delete" asp-route-id="@item.Id">Delete</a>
......
#pragma checksum "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/ExamPractice2020/WebApp/Pages/Recipes/Index.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "02bcb205b748244406e04fff370bdadab5d100ee" #pragma checksum "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/ExamPractice2020/WebApp/Pages/Recipes/Index.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "472f00a8a1721cabfd93ed342e7d39ab78efb96d"
// <auto-generated/> // <auto-generated/>
#pragma warning disable 1591 #pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(WebApp.Pages.Recipes.Pages_Recipes_Index), @"mvc.1.0.razor-page", @"/Pages/Recipes/Index.cshtml")] [assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(WebApp.Pages.Recipes.Pages_Recipes_Index), @"mvc.1.0.razor-page", @"/Pages/Recipes/Index.cshtml")]
...@@ -26,7 +26,7 @@ using WebApp; ...@@ -26,7 +26,7 @@ using WebApp;
#line default #line default
#line hidden #line hidden
#nullable disable #nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"02bcb205b748244406e04fff370bdadab5d100ee", @"/Pages/Recipes/Index.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"472f00a8a1721cabfd93ed342e7d39ab78efb96d", @"/Pages/Recipes/Index.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"8ed6b520c72b3de9d95ec4280f8aa437a54aaae2", @"/Pages/_ViewImports.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"8ed6b520c72b3de9d95ec4280f8aa437a54aaae2", @"/Pages/_ViewImports.cshtml")]
public class Pages_Recipes_Index : global::Microsoft.AspNetCore.Mvc.RazorPages.Page public class Pages_Recipes_Index : global::Microsoft.AspNetCore.Mvc.RazorPages.Page
{ {
...@@ -40,9 +40,10 @@ using WebApp; ...@@ -40,9 +40,10 @@ using WebApp;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_7 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("btn btn-primary mr-2 mb-2 my-1"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_7 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("btn btn-primary mr-2 mb-2 my-1"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_8 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("form-inline"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_8 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("form-inline"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_9 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("method", "get", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_9 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("method", "get", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_10 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-page", "./Edit", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_10 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-page", "/RecipeTags/Index", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_11 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-page", "./Details", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_11 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-page", "./Edit", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_12 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-page", "./Delete", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_12 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-page", "./Details", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_13 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-page", "./Delete", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
#pragma warning disable 0649 #pragma warning disable 0649
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext;
...@@ -81,7 +82,7 @@ using WebApp; ...@@ -81,7 +82,7 @@ using WebApp;
#line hidden #line hidden
#nullable disable #nullable disable
WriteLiteral("\r\n<h1>Recipes</h1>\r\n\r\n<p>\r\n "); WriteLiteral("\r\n<h1>Recipes</h1>\r\n\r\n<p>\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "02bcb205b748244406e04fff370bdadab5d100ee8191", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "472f00a8a1721cabfd93ed342e7d39ab78efb96d8501", async() => {
WriteLiteral("Create New"); WriteLiteral("Create New");
} }
); );
...@@ -97,9 +98,9 @@ using WebApp; ...@@ -97,9 +98,9 @@ using WebApp;
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n</p>\r\n\r\n\r\n"); WriteLiteral("\r\n</p>\r\n\r\n\r\n");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "02bcb205b748244406e04fff370bdadab5d100ee9348", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "472f00a8a1721cabfd93ed342e7d39ab78efb96d9658", async() => {
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("label", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "02bcb205b748244406e04fff370bdadab5d100ee9608", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("label", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "472f00a8a1721cabfd93ed342e7d39ab78efb96d9918", async() => {
} }
); );
__Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.LabelTagHelper>(); __Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.LabelTagHelper>();
...@@ -121,7 +122,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper.For = ModelExpressionProvid ...@@ -121,7 +122,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper.For = ModelExpressionProvid
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "02bcb205b748244406e04fff370bdadab5d100ee11217", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "472f00a8a1721cabfd93ed342e7d39ab78efb96d11527", async() => {
} }
); );
__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>(); __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>();
...@@ -143,7 +144,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid ...@@ -143,7 +144,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("label", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "02bcb205b748244406e04fff370bdadab5d100ee12821", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("label", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "472f00a8a1721cabfd93ed342e7d39ab78efb96d13131", async() => {
} }
); );
__Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.LabelTagHelper>(); __Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.LabelTagHelper>();
...@@ -165,7 +166,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper.For = ModelExpressionProvid ...@@ -165,7 +166,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper.For = ModelExpressionProvid
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "02bcb205b748244406e04fff370bdadab5d100ee14438", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "472f00a8a1721cabfd93ed342e7d39ab78efb96d14748", async() => {
} }
); );
__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>(); __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>();
...@@ -187,7 +188,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid ...@@ -187,7 +188,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n \r\n "); WriteLiteral("\r\n \r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "02bcb205b748244406e04fff370bdadab5d100ee16057", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "472f00a8a1721cabfd93ed342e7d39ab78efb96d16367", async() => {
} }
); );
__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>(); __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>();
...@@ -222,7 +223,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid ...@@ -222,7 +223,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid
#line hidden #line hidden
#nullable disable #nullable disable
WriteLiteral(" "); WriteLiteral(" ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "02bcb205b748244406e04fff370bdadab5d100ee18430", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "472f00a8a1721cabfd93ed342e7d39ab78efb96d18740", async() => {
} }
); );
__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>(); __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>();
...@@ -345,8 +346,8 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid ...@@ -345,8 +346,8 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid
#line hidden #line hidden
#nullable disable #nullable disable
WriteLiteral("\r\n </td>\r\n <td>\r\n "); WriteLiteral("\r\n </td>\r\n <td>\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "02bcb205b748244406e04fff370bdadab5d100ee25170", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "472f00a8a1721cabfd93ed342e7d39ab78efb96d25480", async() => {
WriteLiteral("Edit"); WriteLiteral("Tags");
} }
); );
__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
...@@ -355,19 +356,19 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid ...@@ -355,19 +356,19 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_10); __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_10);
if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null) if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
{ {
throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-id", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues")); throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-RecipeId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
} }
BeginWriteTagHelperAttribute(); BeginWriteTagHelperAttribute();
#nullable restore #nullable restore
#line 63 "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/ExamPractice2020/WebApp/Pages/Recipes/Index.cshtml" #line 63 "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/ExamPractice2020/WebApp/Pages/Recipes/Index.cshtml"
WriteLiteral(item.Id); WriteLiteral(item.Id);
#line default #line default
#line hidden #line hidden
#nullable disable #nullable disable
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"] = __tagHelperStringValueBuffer; __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["RecipeId"] = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("asp-route-id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-RecipeId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["RecipeId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
...@@ -376,8 +377,8 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid ...@@ -376,8 +377,8 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral(" |\r\n "); WriteLiteral(" |\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "02bcb205b748244406e04fff370bdadab5d100ee27350", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "472f00a8a1721cabfd93ed342e7d39ab78efb96d27701", async() => {
WriteLiteral("Details"); WriteLiteral("Edit");
} }
); );
__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
...@@ -391,7 +392,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid ...@@ -391,7 +392,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid
BeginWriteTagHelperAttribute(); BeginWriteTagHelperAttribute();
#nullable restore #nullable restore
#line 64 "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/ExamPractice2020/WebApp/Pages/Recipes/Index.cshtml" #line 64 "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/ExamPractice2020/WebApp/Pages/Recipes/Index.cshtml"
WriteLiteral(item.Id); WriteLiteral(item.Id);
#line default #line default
#line hidden #line hidden
...@@ -407,8 +408,8 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid ...@@ -407,8 +408,8 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral(" |\r\n "); WriteLiteral(" |\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "02bcb205b748244406e04fff370bdadab5d100ee29536", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "472f00a8a1721cabfd93ed342e7d39ab78efb96d29881", async() => {
WriteLiteral("Delete"); WriteLiteral("Details");
} }
); );
__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
...@@ -422,6 +423,37 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid ...@@ -422,6 +423,37 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid
BeginWriteTagHelperAttribute(); BeginWriteTagHelperAttribute();
#nullable restore #nullable restore
#line 65 "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/ExamPractice2020/WebApp/Pages/Recipes/Index.cshtml" #line 65 "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/ExamPractice2020/WebApp/Pages/Recipes/Index.cshtml"
WriteLiteral(item.Id);
#line default
#line hidden
#nullable disable
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"] = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("asp-route-id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral(" |\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "472f00a8a1721cabfd93ed342e7d39ab78efb96d32067", async() => {
WriteLiteral("Delete");
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Page = (string)__tagHelperAttribute_13.Value;
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_13);
if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
{
throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-id", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
}
BeginWriteTagHelperAttribute();
#nullable restore
#line 66 "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/ExamPractice2020/WebApp/Pages/Recipes/Index.cshtml"
WriteLiteral(item.Id); WriteLiteral(item.Id);
#line default #line default
...@@ -439,7 +471,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid ...@@ -439,7 +471,7 @@ __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvid
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n </td>\r\n </tr>\r\n"); WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#nullable restore #nullable restore
#line 68 "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/ExamPractice2020/WebApp/Pages/Recipes/Index.cshtml" #line 69 "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/ExamPractice2020/WebApp/Pages/Recipes/Index.cshtml"
} }
#line default #line default
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment