Archives
-
Perform Bulk Updates and Deletes in Entity Framework Core
If you are keeping an eye on the new features of EF Core 7, you are probably aware that it includes what is known as Bulk Updates. To that end, this article discusses what bulk updates are and how to use them in your ASP.NET Core applications.
-
Execute queries and stored procedures using Dapper in ASP.NET Core
In the last few articles we have discussed how ADO.NET data provider classes such as connection, command, and data reader can be used to execute queries. This approach gives total control over the queries we execute and it's also good in terms of performance. However, it requires you to write good amount of code. Won't it be nice if there some way to reduce this mapping code? That' where Dapper can come handy. In this article we will learn to use Dapper in ASP.NET Core apps.
-
Use Microsoft.Data.SqlClient classes with Entity Framework Core
In the previous article we learned to execute stored procedures using SqlCommand and SqlParameter classes. In the examples we developed so far, we used data provider classes directly for all the operations. We didn't use Entity Framework Core at all. What if your application wants to use EF Core? Can we use EF Core and plain data provider objects hand-in-hand? That's what we are going to discuss in this article.
-
Create Razor Pages app that uses Customer Repository
In the previous article we completed the CustomerRepository class that performs CRUD operations on the Customers table. Now it's time to use the CustomerRepository in a Razor Pages application so that we can test the CRUD operations from the browser.
-
Execute action queries using SqlCommand in ASP.NET Core
In the previous article we used SqlDataReader to execute SELECT queries and to read data from the database. You often need to execute action queries - INSERT, UPDATE, and DELETE - on the database to perform the respective operations. As far as as SQL Server data provider is concerned you can do that with the help of SqlCommand object. That's what we are going to discuss in this article.
-
Use SqlDataReader to Read Data in ASP.NET Core
In the previous article we learned the basics of the ADO.NET data provider for SQL Server. We also took a glance at the SQL Server data provider's object model. Now it's time to put those objects to use in a simple CRUD web application. To that end this article kicks off the development by creating a simple repository for performing the CRUD operations.
-
Understand ADO.NET Data Provider for SQL Server in ASP.NET Core
At times you may want to skip using EF Core and delve into the underlying data provider yourself. It would be helpful for beginners to understand how EF Core might be working behind the curtains of easy to use ORM. To that end this article gives you a brief overview of the ADO.NET data provider for SQL Server.
-
Use SQLite In-Memory Database in ASP.NET Core
In the previous article you learned to use Entity Framework Core InMemory provider to store and retrieve your application data for testing and demoing purposes. An alternative (and a recommended option) is to use SQLite database in in-memory mode. To that end this article discusses just that.
-
Use Entity Framework Core In-Memory Database in ASP.NET Core
Most of the production cases call for storing data in some physical data store such as a SQL Server database. However, for testing and demoing purposes you may want to store data in memory rather than persistent store. That's where Entity Framework Core InMemory provider can be helpful. In this article we will examine the usage of the EF Core InMemory provider in an ASP.NET Core Razor Pages application.
-
Create master detail components in Blazor Server (Detail CRUD Components)
In the previous part of this article series you developed ListTeamMembers.razor component. Now you need to develop the remaining components namely ShowTeamMember.razor, InsertTeamMember.razor, and UpdateTeamMember.razor. You have already these empty component files in the Shared > TeamMembers folder. The UI rendered by the ShowTeamMember component is shown below.
-
Create master detail components in Blazor (List of Team Members)
In the preceding part of this article series you created master CRUD components namely ListTeams, ShowTeam, InsertTeam, and UpdateTeam. Continuing your development you will complete the detail CRUD components in this part. By the end of this part you will be able to see master-detail behavior and CRUD operations in action. So, let's get started with the detail components.
-
Create master detail components in Blazor Server (Master CRUD Components)
In the previous part of this article series you developed the List component that displays a list of Teams in a table. In this part you will create ShowTeam, InsertTeam, and UpdateTeam components to perform the CRUD operations on the Teams table. The following figure shows how the ShowTeam component displays a Team in the browser.
-
Create master detail components in Blazor Server (Project Structure)
In the previous part of this series you were introduced to the UI and overall functioning of the master-detail Blazor Server app. You also created Team and TeamMembers tables and EF Core model. You have already created the Blazor Server project. Now it's time to kick start the component development. To build the master detail UI you could have but all the markup and the code in a single Razor component.
-
Create master detail components in Blazor Server (UI and Tables)
Modern applications often prefer to use rich client side frameworks over traditional server side processing. ASP.NET Core provides Blazor (Server and WebAssembly) as a framework for building rich client side web apps. It would be interesting to see how the master detail user interface can be built using Blazor. To that end this multipart article series is going to show you in detail how Blazor Server can be put to use for developing master detail pages.
-
Create jQuery client that invokes the minimal APIs (Sign In and Sign Out)
In the previous part of this multipart article series we migrated the minimal APIs to API controller in order to understand the efforts involved in the process. So far we have learned various aspects of creating minimal APIs. Now let's learn to create client applications that consume the minimal APIs.
-
Twenty years of .NET
On 13 February 2022 .NET is completing its strong presence of 20 years. Microsoft and developer community is all set to celebrate this occasion in variety of ways. You can read more about their plans here. You can also take a look at what others are doing on Twitter here.
-
Migrate minimal APIs to controller based APIs
In the previous part of this article series we discussed a few ways of organizing minimal APIs. There can be situations when you would want to migrate your minimal APIs to controller based APIs. In this article we will move our minimal APIs to controller based APIs and see how much work is involved.
-
Six ways to organize minimal APIs in ASP.NET Core applications
In the previous part of this article series you learned to add minimal APIs to the Startup class. So far we have added minimal APIs to the Program.cs file. If you have only a handful of APIs this won't create any problem. But if you have a lots of minimal APIs to deal with, at some point you will want to organize them in a better way.