A MiddlewareFilter is the perfect tool for creating conditional logic on MVC controllers or actions using .NET Core. It receives the Middleware benefits of natural dependency injection, and also can dip into the MVC pipeline. You can use it conditionally, see current MVC routes, and also short-circuit before the MVC action happens. Here is how to [&hellip
Read More…
What is dynamic routing? The purpose of dynamic routing is to produce pretty, intuitive URLs on your website that help improve SEO and make your application look more professional. For example, if I own the site ferrets.com and have a database of the different breeds of ferrets, I could use dynamic routing to produce URLs [&hellip
Read More…
In order to maintain historical accuracy, data should not be truly deleted from a database. A soft delete can be used to signify a record is no longer valid, while persisting the data for any later use. Usually this is done by adding a “disabled” or “deleted” boolean column to each table on the database. [&hellip
Read More…
I first noticed the yield keyword on some shared code at work about a year ago. Befuddled, I read MSDN’s description of the yield keyword a few times, yet I still didn’t completely understand it. In traffic law, the yield sign is defined as follows: A yield sign indicates that each driver must prepare to stop [&hellip
Read More…
A Quick Preface A shallow copy of an object is one that points to the same place in memory as the original. Any changes made to the copy also effect the original because the copy references the same place in memory as the original. (see accessing by reference) A deep copy of an object is one that [&hellip
Read More…