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
Your Apple devices might be vintage now
Tuesday, July 2, 2024
Best July 4th tech sales; End of ChromeOS Flex?; Nasty OpenSSH flaw -- ZDNET ZDNET Tech Today - US July 2, 2024 placeholder Apple says your device may now be vintage or obsolete - here's why and
DeveloPassion's Newsletter #171 - Not the future you want
Tuesday, July 2, 2024
Edition 171 of my newsletter, discussing Knowledge Management, Knowledge Work, Zen Productivity, Personal Organization, and more! Sébastien Dubois DeveloPassion's Newsletter DeveloPassion's
Anthropic wants to lead the AI safety movement
Tuesday, July 2, 2024
Anthropic to fund 3rd-parties to evaluate AI security and societal effects View this email online in your browser By Rebecca Bellan Tuesday, July 2, 2024 Welcome to TechCrunch AM! This morning, we'
LW 140 - I made $1,436,828 with 2 Shopify Apps
Tuesday, July 2, 2024
I made $1436828 with 2 Shopify Apps Shopify Development news and articles Issue 140 - 07/02/2024 Read Online Liquid Weekly All Things Shopify Development I made $1436828 with 2 Shopify Apps I made
⚙️ AI won’t take your job; employers using AI will
Tuesday, July 2, 2024
Plus: LLMs aren't good at abstractive reasoning
ECMAScript 2024; new Set methods; JS performance initiative; rounding errors; benchmarking tool
Tuesday, July 2, 2024
We have 10 links for you - Stay up-to-date on JavaScript and tools This Week In React - Keeps senior React devs up to date thisweekinreact.com Partner We keep over 40k mid/senior React devs up-to-date
Chinese Hackers Exploiting Cisco Switches Zero-Day to Deliver Malware
Tuesday, July 2, 2024
THN Daily Updates Newsletter cover [Watch LIVE] The AI Revolution in Vulnerability Management: 2025 Trends for Security Leaders Transform Your Team: Learn How Security Champions Turn Developers into
A Comprehensive Guide to DORA Readiness for Financial Services
Tuesday, July 2, 2024
Identity Zero Trust Framework A down-to-earth, honest exploration of how to meet the compliance regulations of the EU's Digital Operational Resilience Act (DORA). If you are doing business in the
Post from Syncfusion Blogs on 07/02/2024
Tuesday, July 2, 2024
New blogs from Syncfusion Easily Export .NET MAUI DataGrid to Specific PDF Page By Jayaleshwari N This blog explains how to easily export the Syncfusion .NET MAUI DataGrid to a specific page in a PDF
Edge 409: Augmenting Autonomous Agents with Long-Term Memory
Tuesday, July 2, 2024
Making agents remember beyond the context window. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏