Thoughts on .Net & Coding
.Net Articles, tutorials, reviews, code and more...
-
CRUD using fetch() and Razor Pages in ASP.NET Core -- Part 1
In the previous article we discussed the basics of the browser's fetch() API. We also fetched HTML page from the server using GET verb. Now it's time to do something more interesting -- CRUD operations using fetch() and Razor Pages.
-
Learn to fetch() resources in ASP.NET Core
Making Ajax requests from the client side JavaScript code to the server side resources is extremely common requirement in web applications. Traditionally developers used XMLHttpRequest (XHR) object to accomplish this task. Although you can continue to use XHR there is a better alternative - Fetch API.
-
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.