MVC: URLs with Multiple IDs

Please see my other MVC articles. Update Routing to Handle Multiple ID URLs In this article, I’ll demonstrate how to use multiple values in a URL without the use of QueryString variables. In the RouteConfig class, map a new route as follows. Note: I specified a controller as this URL will only be used for this controller, and…

OOP: Interfaces Ensure Consistent Behavior

Please see my other Object-Oriented Programming (OOP) articles. Apply Contracts Between Objects with Interfaces In this article I’ll demonstrate how to ensure consistent behavior when designing an application. I’m going to build an airport that only accepts types of craft which behave in a consistent manner. Also, when the airport is in operation, I want to ensure…

GitHub: Commit

Using Git to Track/Record Changes In my last article I demonstrated how to use the Git bash command-line to setup a new repo. In this article, I’ll show how to use commit to track and record changes. I’m starting with an empty repo so first I’ll add a new blank readme.md. Now, I’ll see if…

Git: Setup a New Repository

Use Git to Setup a New Repository In this article I’ll demostrate how to use the Git bash command-line to setup a new repo. First, I’ll start with a new empty folder in which I plan to store a development solution. Now I’m ready to initialize the new folder as a git folder, create a…

ASP.NET Core: appsettings.json

Using AppsSettings.Json to Store/Retrieve data In this article I’ll demonstrate how to use Microsoft’s replacement configuration file to web.config, appsettins.json. Similar to all .json files, this change means much easier config file for projects due to its simple attribute–value pairs and arrays format, over the highly proprietary web.config file format, which changes often with each…

C# Interfaces – Extending Behavior

Architecting Behavior for Extensibility When designing class behavior, it’s important to remember in the implementation of those objects, future changes are certain, necessitating flexibility to evolving requirements. Extensibility in Design When designing behavior in classes, you can simply define functions to be used as object methods, but that assumes the details of each function need…

C# Language Integrate Query (LINQ)

Please see my other C# articles. All to test a collection Any() to test a collection   Call Custom Method Distinct for unique values Equality Comparer Filtering by Custom Extension Query Set Operator Skip N number objects SkipWhile to get objects   Set Using Custom Method Take first N number objects TakeWhile to get objects

C#: LINQ – Equality Comparer

Please see my other LINQ articles. Implement an Equality Comparer to customize Contains(). In this article I’ll demonstrate how to override Contains() when searching a collection to specify which properties of objects to search. First, I’ll get a collection of static People objects. Now, I’ll implement a custom Equality Comparer class where I’ll override Equals() to search…