Hi,
I am new to Razor pages - have successfully complete the 2.0 Razor - EF tutorial and the 2.0 MVC - EF tutorial. I am trying to make pages from "real" data now using Visual Studio 2017 and SQL Server 2016. I have successfully scaffolded the VaporProductLines table (CompanyNumber, ProductLineCode, ProductLineDescription, ActiveFlag) to the Model and to Razor Pages. I have successfully linked the Index page to the Menu - The Create link works. I am stuck at trying to navigate to the Edit, Delete and Details pages. The table has a composite key (CompanyNumber, ProductLineCode). I have put the following in the @HtmlActionLink (s).
@Html.ActionLink("Edit", "Edit", new { CompanyNumber= item.CompanyNumber, ProductLineCode = item.ProductLineCode }) |
@Html.ActionLink("Details", "Details", new { CompanyNumber = item.CompanyNumber, ProductLineCode = item.ProductLineCode }) |
@Html.ActionLink("Delete", "Delete", new { CompanyNumber = item.CompanyNumber, ProductLineCode = item.ProductLineCode })
The links do nothing - just return to the index page - any insight would be appreciated. I used the fluent API in the DBContext to connect the primary key.
Thanks for your help:
Michael