How to call Stored Procedures in ASP.NET Core
How to call Stored Procedures in ASP.NET CoreIn this week's newsletter, let's talk about how we can call Stored Procedures from our ASP.NET Core API using Entity Framework Core with an illustrating example.
In this week's newsletter, let's talk about how we can call Stored Procedures from our ASP.NET Core API using Entity Framework Core with an illustrating example. Why do you need Stored Procedures?Stored Procedures encapsulate complex queries or programming logic which, when executed on a database produces data results. These programming structures help developers in reusing the scripts whenever required, while creating opportunities for separating database programming from the upper tiers. 3 Ways to call Stored Procedures in ASP.NET CoreWith ASP.NET Core, you can call Stored Procedures in 3 ways, based on how your database interaction is designed. If you’re using Entity Framework Core -If your application interacts with the database using Entity Framework Core and the Stored Procedures return results from a single Entity then you call call FromSql() or FromSqlRaw() methods on the DatabaseContext. However, If your Stored Procedures return results as DTO objects instead of a single Entity then you can’t use Entity Framework Core directly and have to go with the old school ADO.NET framework via the Database Context connection object. Or you have the Dapper ORM -Alternatively, you can use Dapper, which is a lightweight ORM that doesn’t have the scaffold or the mapping features of Entity Framework Core but still works with DTO objects. You can find the complete article, where I have explained each of these in detail with illustrating examples. You can check out the article here - https://referbruv.com/blog/working-with-stored-procedures-in-aspnet-core-ef-core/ ANNOUNCEMENT - Youtube Channel is now Live 🥳I always wanted to explore new ways to create informative content on the technologies I had learnt and explored. I’m happy to announce that I’ve started a new Youtube Channel - https://www.youtube.com/@referbruv I’d love for you to check out the channel and please please subscribe! ❣️❣️ |
Older messages
Summarizing Complexity Analysis of Sorting and Searching Algorithms
Wednesday, March 6, 2024
In this week's newsletter, I want to briefly introduce you to time and space complexity and then follow it up with complexity analysis of the most popular sorting and searching algorithms.
Setting up Auditable Entities with EF Core
Wednesday, March 6, 2024
In this week's newsletter, I want to introduce you to the concept of auditable entities and how you can implement it with Entity Framework Core. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
How to Integrate Swagger UI with Spring Boot 3
Wednesday, March 6, 2024
In this week's newsletter, let us see how we can implement SwaggerUI and OpenAPI specification for a simple Spring Boot 3 RESTful API ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
Implementing CORS in an ASP.NET Core Web API
Wednesday, March 6, 2024
In this detailed guide, let's talk about what is CORS and how do we enable CORS in ASP.NET Core with an illustrating example ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
How to use SignalR with .NET 6 and new Digital Product Announcement!
Monday, May 29, 2023
Hello there, Hope you are doing good. This week I wanted to recap on one of the most interesting posts I've ever worked on - Real time communication. How to use SignalR with ASP.NET Core Angular
You Might Also Like
Daily Coding Problem: Problem #1707 [Medium]
Monday, March 3, 2025
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Facebook. In chess, the Elo rating system is used to calculate player strengths based on
Simplification Takes Courage & Perplexity introduces Comet
Monday, March 3, 2025
Elicit raises $22M Series A, Perplexity is working on an AI-powered browser, developing taste, and more in this week's issue of Creativerly. Creativerly Simplification Takes Courage &
Mapped | Which Countries Are Perceived as the Most Corrupt? 🌎
Monday, March 3, 2025
In this map, we visualize the Corruption Perceptions Index Score for countries around the world. View Online | Subscribe | Download Our App Presented by: Stay current on the latest money news that
The new tablet to beat
Monday, March 3, 2025
5 top MWC products; iPhone 16e hands-on📱; Solar-powered laptop -- ZDNET ZDNET Tech Today - US March 3, 2025 TCL Nxtpaper 11 tablet at CES The tablet that replaced my Kindle and iPad is finally getting
Import AI 402: Why NVIDIA beats AMD: vending machines vs superintelligence; harder BIG-Bench
Monday, March 3, 2025
What will machines name their first discoveries? ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
GCP Newsletter #440
Monday, March 3, 2025
Welcome to issue #440 March 3rd, 2025 News LLM Official Blog Vertex AI Evaluate gen AI models with Vertex AI evaluation service and LLM comparator - Vertex AI evaluation service and LLM Comparator are
Apple Should Swap Out Siri with ChatGPT
Monday, March 3, 2025
Not forever, but for now. Until a new, better Siri is actually ready to roll — which may be *years* away... Apple Should Swap Out Siri with ChatGPT Not forever, but for now. Until a new, better Siri is
⚡ THN Weekly Recap: Alerts on Zero-Day Exploits, AI Breaches, and Crypto Heists
Monday, March 3, 2025
Get exclusive insights on cyber attacks—including expert analysis on zero-day exploits, AI breaches, and crypto hacks—in our free newsletter. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
⚙️ AI price war
Monday, March 3, 2025
Plus: The reality of LLM 'research'
Post from Syncfusion Blogs on 03/03/2025
Monday, March 3, 2025
New blogs from Syncfusion ® AI-Driven Natural Language Filtering in WPF DataGrid for Smarter Data Processing By Susmitha Sundar This blog explains how to add AI-driven natural language filtering in the