Thoughts on .Net & Coding
.Net Articles, tutorials, reviews, code and more...
-
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?
-
Pass Parameters to Blazor Components
Blazor apps consist of one or more components. A component can receive data from an external source through parameters. In this article you will learn to add parameters to a Blazor component. You will also learn to various ways of setting the parameter values. Begin by creating a new Blazor Server App project in Visual Studio.
-
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.
-
Work with GitHub repositories using Git menu of Visual Studio
Visual Studio 2019 now presents a new Git menu and improved source control experience. It is worthwhile for any beginner in ASP.NET Core 5.0 to familiarize themselves with these new features. To that end this article takes a quick look at some of the common options available as a part of the new Git experience.
-
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.
-
Integrate ASP.NET Core Identity with Microsoft account
In the previous article you learned to use Microsoft Account as an external login to your ASP.NET Core web apps. In that article you didn't use ASP.NET Core Identity in any way. The Microsoft Account alone was used in the authentication process without any local account. At times you may want to integrate the Microsoft account with a local account.
-
Authenticate users using Microsoft account in ASP.NET Core
At times you want to integrate external logins with your ASP.NET Core applications. External logins include Microsoft accounts, Google, Facebook, or Twitter. When you use external logins, the login details such as user name and password aren't stored in your local database. They are stored in some external store and you are required to "get in touch" with that external source to authenticate your website users. In this article you will learn to integrate Microsoft Account based login mechanism in your ASP.NET Core web app.
-
Upload files using InputFile component in Blazor
If you are tracking the development of ASP.NET Core 5, you are probably aware that RC1 of the framework is now available. One of the additions for Blazor Server and Blazor WebAssembly is the InputFile component to deal with file uploaded. In this article I am going to take a quick look at the InputFile component and discuss a possible file upload process for Blazor Server as well as Blazor WebAssembly apps.
-
Authenticate gRPC calls in ASP.NET Core
ASP.NET Core supports creation of RPC style services using gRPC. Once created you might also want to secure them by authenticating and authorizing the service calls. To that end this article discusses a possible approach to implementing authentication in gRPC services.