Returning Status Codes in an ASP.Net MVC Core Controller
There are a few ways to return different status codes in an ASP.Net MVC Core controller. Simplified Helper Methods Some helper methods for the most common codes (there may be [...]
There are a few ways to return different status codes in an ASP.Net MVC Core controller. Simplified Helper Methods Some helper methods for the most common codes (there may be [...]
When using Identity in ASP.Net Core, it can be useful to seed some data for testing purposes. How to go about that is not entirely obvious, given that the tables [...]
This example demonstrates how to create & configure an ASP.Net Core 3.1 MVC project with Entity Framework. I've included instructions on adding the appropriate NuGet packages, setting up the connection [...]
This example demonstrates how to add an Entity Framework Core database context as a service using Dependency Injection (a form of Inversion of Control) in ASP.Net MVC Core 3.1. I've [...]
When building applications with ASP.Net Core and Entity Framework, Microsoft often recommends in their official training (including course 20486D) that developers use the Repository Pattern to further abstract Entity Framework. [...]
This example demonstrates how to add an Entity Framework Core database context as a service using Dependency Injection (a form of Inversion of Control) in ASP.Net MVC Core 2, with [...]
It is easy to display input errors using a field's validation message in a view. Simply call ModelState.AddModelError() passing in the property ID and error message, then return the View(). [...]
In order for a drop-down list in an MVC View to be populated with data from the model, one method is to add the data to a model (or to [...]