Thoughts on .Net & Coding

.Net Articles, tutorials, reviews, code and more...

  • Perform Master Detail CRUD operations in AspNet Core (Part 2)

    In the previous part of this article series you were introduced to the sample application we are building. You also created the EF Core model consisting of Team, TeamMember, and AppDbContext classes. In this part we will add TeamsController to the web application perform CRUD operations on the Teams table. Open the same project that we created in the previous part and add two enumerations to the Models folder named DataDisplayModes and DataEntryTargets.

  • Perform Master Detail CRUD operations in ASP.NET Core (Part 1)

    Master-detail pages are quite common in many web applications. There are various approaches to building master-detail pages including server side, client side, and hybrid. There are also many third-party controls and plugins that can be used to accomplish this task. It would be interesting for beginners to learn and understand how master-detail pages work and how they can be developed in ASP.NET Core. To that end this multipart article explains how master-detail pages can be developed using purely server side code without relying on any third-party component or library.

  • Client Side Form Validations Using TypeScript For Beginners

    Validating a data entry form before submitting it to the server is one of the most common task in web applications. In ASP.NET Core you can easily do that with the help of validation attributes and tag helpers. However, at times you need to take charge of the client side validation process and roll out your own strategy to validate the data being submitted to the server. For example, you might be building a SPA and want to validate data using HTML5 features. To that end this article discusses how HTML5 form validation features can be used in TypeScript and ASP.NET Core.

  • Understand Cascading Parameters and Cascading Values in Blazor

    In the previous article we discussed arbitrary parameters and attribute splatting. Now it's time to understand one more aspect of passing values to a Blazor component from the external world - Cascading Parameters and Cascading Values. In all the examples discussed so far, we explicitly set a parameter value from the parent component. This means if we want to pass a value to, say, ten components, we must set a parameter of all the ten components. In such cases Cascading Parameters and Cascading Values come handy. The remainder of this article discusses how.

  • Use Arbitrary Parameters and Attribute Splatting in Blazor

    In the previous article we discussed how parameters can be passed to Blazor component. In the examples discussed so far you created a fixed number of parameters (for example, Value parameter of the Message component) and assigned them some value from the parent component (Index.razor in our examples). What if you want to pass arbitrary number of parameters to a component?

  • Separate UI and Code in Blazor

    Blazor apps consist of one or more components. Components reside in .razor files and consist of UI markup and C# code. When you create a new Blazor server or WebAssembly project it stores component UI and code in a single file. However, at times this single file approach might not be adequate. Luckily, you can separate your UI markup and C# code easily. This article shows how.

  • Use OData services in AspNet Core

    Recently Microsoft released OData Preview 8 for ASP.NET Core 5. OData or Open Data protocol is a standard for creating REST style services that offer inbuilt querying capabilities to developers. This allows for implementing paging, sorting, and reshaping of data quickly and easily. In this article I will take you through the basics of creating an OData service in ASP.NET Core 5. We will then invoke the OData service using Postman.