Thoughts on .Net & Coding
.Net Articles, tutorials, reviews, code and more...
-
Create your own .NET CLI tool
As a ASP.NET Core developer you are familiar with .NET Command Line Interface (CLI). You must have also used CLI tools such as dotnet-ef while building ASP.NET Core web apps. In addition to using built-in CLI tools you can create your own tools that can be used with .NET CLI. To this end this article introduces you to the overall tool creation and registration process.
-
Minimal APIs in AspNet Core 6
ASP.NET Core 6 has introduced minimal APIs that provide a new way to configure application startup and routing a request to a function. In my previous article I covered the new way of configuring application startup. In this article we will see how the new routing APIs can be used to map HTTP verbs to a function.
-
Configure application startup in ASP.NET Core 6
If you are tracking the progress of ASP.NET Core 6, you are probably aware of the new features being introduced. One of the new and interesting features of ASP.NET Core 6 is the new way of configuring web application startup in just a few lines of code. Currently this new way of application startup has been introduced in empty project templates but you can easily use it in any other project template (say, ASP.NET Core MVC or Razor Pages). To that end this article shows you how standard ASP.NET Core MVC project template generated code can be modified to use the new way of application startup.
-
Setup Blazor app using ASP.NET Core Empty project template (Part 2)
In Part 1 of this article, you learned to setup a Blazor Server app using ASP.NET Core's empty project template. Continuing further, this part teaches you to prepare a Blazor WebAssembly app using an empty project template. Since you are familiar with the basics outlined in the previous part, let's get going by creating a new empty project in Visual Studio.
-
Setup Blazor app using ASP.NET Core Empty project template (Part 1)
Visual Studio offers Blazor Server and Blazor WebAssembly project templates to the ASP.NET Core developers. Most of the times beginners are taught to utilize these default project templates to build the respective Blazor apps. However, it would be an interesting exercise for beginners to setup Blazor Server and Blazor WebAssembly projects using ASP.NET Core's Empty project template. In this two part article you will develop Blazor "Hello World" application using the Empty project template.
-
Use CSS isolation in AspNet Core MVC, Razor Pages, and Blazor
ASP.NET Core developers often store styling information for MVC views, Razor Pages, and Razor Components into a style sheet file. The style sheet is then applied to various pages using HTML element. Although this works great in many cases, at times you might want to isolate view / page / component specific styling information into its own CSS file. Luckily, MVC views, Razor Pages, and Razor Components support such CSS isolation. This article explains how.
-
Perform Master Detail CRUD operations in AspNet Core (Part 6)
In Part 5 of this series you created three partials namely _ShowTeam, _InsertTeam, and _UpdateTeam. In this part you will add the remaining three partials viz. _ShowTeamMember, _InsertTeamMember, and _UpdateTeamMember. For your quick reference let's take a look at the organization of partials again:
-
Perform Master Detail CRUD operations in AspNet Core (Part 5)
In Part 4 of this article series we added the Main view, _Teams partial, and _TeamMembers partial. Recollect that _Teams partial and _TeamMembers partial show a Team or TeamMember record in read-only, insert, or update mode. This is done with the help of six partials - three belonging to _Teams partial and three belonging to _TeamMembers partial.
-
Perform Master Detail CRUD operations in ASP.NET Core (Part 4)
In Part 2 and Part 3 of this article series we completed TeamsComtroller and TeamMembersController respectively. All of the controller actions that we wrote so far return Main view. They also supply a MasterDetailViewModel object to the Main view. In this part we will begin developing a set of views and partials that renders the UI of the application.
-
Perform Master Detail CRUD operations in AspNet Core (Part 3)
In the previous part of this article series you created the TeamsController that performs CRUD operations on the Teams table. In this part you will continue to develop the app by creating TeamMembersController. The TeamMembersController performs CRUD operations on the TeamMembers table. Begin by adding TeamMembersController class into the Controllers folder. The following figure shows both the controllers in the Controllers folder.