Using Entity Framework 6.1.3 with custom table in MSSQL Database
I have implemented EF 6 in my project, since I need to add bookings to a booking table stored in a MSSQL Database. I've done all the steps required to add the EF functionality, but I can't seem to generate a link to my Create view, which is what I need.
And created a controller to scaffold my CRUD views.
public class BookingsController : Controller
{...}
Now, I have all my views ready, but I can't link to them using normal MVC means.
I have a button which needs to redirect to the create view. This is what i tried so far:
<a href='@Url.Action("Index", "Bookings")'><button class="btn_1" type="button">Book dette sommerhus</button></a>
Right now I am just redirecting to the index view for testing purposes, but what is generated in the HTML is just an empty a tag with a nested button. The href attribute isn't even generated.
Using Entity Framework 6.1.3 with custom table in MSSQL Database
I have implemented EF 6 in my project, since I need to add bookings to a booking table stored in a MSSQL Database. I've done all the steps required to add the EF functionality, but I can't seem to generate a link to my Create view, which is what I need.
I created the ADO.NET Entity Data Model, which has this structure: https://i.imgur.com/y0oNnWn.png
And created a controller to scaffold my CRUD views.
public class BookingsController : Controller {...}
Now, I have all my views ready, but I can't link to them using normal MVC means.
I have a button which needs to redirect to the create view. This is what i tried so far:
Right now I am just redirecting to the index view for testing purposes, but what is generated in the HTML is just an empty a tag with a nested button. The href attribute isn't even generated.
I tried creating an action link as well:
Which just sends me to this URL: http://localhost:49742/umbraco/Surface/Bookings
And returns a 404 resource not found error.
What am I doing wrong? Can I not use the standard MVC way to access my views? Do I need to inherit from the Umbraco controllers?
Now my ActionLink somehow started working, but my Url.Action which is the one I want to use, still doesn't generate a link to my desired view.
is working on a reply...