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
Stop Using the Wrong State Management in Jetpack Compose
Thursday, November 21, 2024
View in browser 🔖 Articles Benchmark Insights: Direct State Propagation vs. Lambda-based State in Jetpack Compose Here, we'll dive into some benchmark analysis on the state propagation approach in
wpmail.me issue#694
Thursday, November 21, 2024
wpMail.me wpmail.me issue#694 - The weekly WordPress newsletter. No spam, no nonsense. - November 21, 2024 Is this email not displaying correctly? View it in your browser. News & Articles State of
Turn off Google AI with two letters
Thursday, November 21, 2024
$250 off M4 MacBook; Linux Foundation marks 20 years; Bluesky tips -- ZDNET ZDNET Tech Today - US November 21, 2024 laptop This absurdly simple trick turns off AI in your Google Search results There
PHPWeekly November 21st 2024
Thursday, November 21, 2024
Curated news all about PHP. Here's the latest edition Is this email not displaying correctly? View it in your browser. PHP Weekly 21st November 2024 Hi everyone, PHP 8.4 id due for a release today,
Edge 450: Can LLM Sabotage Human Evaluations
Thursday, November 21, 2024
New research from Anthropic provides some interesting ideas in this area. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
Don’t Wait In Line or Online.
Thursday, November 21, 2024
Quick. Easy. Simple. Shop Zugu for the crew. We know we say it every year but, trust us, if feels really good to get ahead of those holiday gifts. Skip the lines, even online, and shop something for
Google's AI-Powered Tool Finds 26 Vulnerabilities in Open-Source Projects
Thursday, November 21, 2024
THN Daily Updates Newsletter cover [Watch LIVE] When Shift Happens: Are You Ready for Rapid Certificate Replacement? Revocations can disrupt your business, but automation saves the day. Discover how.
⚙️ Nvidia doubles revenue
Thursday, November 21, 2024
Plus: US proposes 'Manhattan Project' for AGI
Post from Syncfusion Blogs on 11/21/2024
Thursday, November 21, 2024
New blogs from Syncfusion Secure JWT Storage: Best Practices By Binara Prabhanga Learn about common JWT security risks and best practices for secure JWT storage in SPAs, including HttpOnly cookies,
Top Tech 🏆 The Galaxy Tab S10+ Is Excellent — This is the Most Sturdy Car Phone Holder I've Used
Thursday, November 21, 2024
Also: Testing the The Sennheiser Accentum Earbuds, and More! How-To Geek Logo November 21, 2024 🤖 Android at Its Best The iPad is the most popular tablet, but that doesn't mean other options aren