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
Weekend Reading — Happy "That's a January Problem" week
Saturday, December 21, 2024
Can Christmas season start a little earlier this year Tech Stuff Ramsey Nasser fuck it happened i am in a situation where i do actually need to reverse a linked list Atuin I just learned about Atuin
Daily Coding Problem: Problem #1644 [Easy]
Saturday, December 21, 2024
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by IBM. Given an integer, find the next permutation of it in absolute order. For example,
🐧 Whatever Happened to Unix Workstations? — My Incredibly Cheap Alternative to a Soundbar
Saturday, December 21, 2024
Also: Here's Why More Games Need Expanded Difficulty Settings How-To Geek Logo December 21, 2024 Did You Know Lake Wendouree, an artificially created and maintained shallow urban lake in Australia,
Supercharge Your Knowledge Capture Workflow with the Obsidian Web Clipper
Saturday, December 21, 2024
Stop juggling multiple tools and supercharge your knowledge capture workflow with Obsidian's powerful Web Clipper browser extension Sébastien Dubois DeveloPassion's Newsletter Supercharge Your
Charted | The World's Most Valuable Automakers 🚙
Saturday, December 21, 2024
Tesla shares reached a record high, setting a new valuation milestone. This graphic highlights the world's most valuable automakers by market cap. View Online | Subscribe | Download Our App
Next Holiday Season, Ignore Everyone Except One Customer
Saturday, December 21, 2024
Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, December 21, 2024? The
🐍 New Python tutorials on Real Python
Saturday, December 21, 2024
Hey there, There's always something going on over at Real Python as far as Python tutorials go. Here's what you may have missed this past week: 🎓 Master Python's Core Principles (New Live
Post from Syncfusion Blogs on 12/21/2024
Saturday, December 21, 2024
New blogs from Syncfusion ASP.NET MVC Suite Update: Aligning with .NET Changes By Rajendran R Discover key updates in our ASP.NET MVC suite, aligning with Microsoft's latest .NET changes for
LockBit Ransomware Developer Charged for Billions in Global Damages
Saturday, December 21, 2024
THN Daily Updates Newsletter cover The Data Science Handbook, 2nd Edition ($60.00 Value) FREE for a Limited Time Practical, accessible guide to becoming a data scientist, updated to include the latest
Re: My VPN recommendation
Saturday, December 21, 2024
Do you know when to use a VPN and what it does to protect your data? Any time you are connected to the internet, your information is at risk of being tracked or hacked. A VPN helps keep your surfing