How to create stored procedure in .net core and get results.

To the point, I going to explain to you how to do it. Create new class that you want to return from a stored procedure Add dbSet in you DbContext file call in your service Thanks

.net core or MVC using entity framework execute Raw SQL Queries, select, insert, update and delete.

Execute Raw SQL Queries in Entity Framework. In ado.net we know we directly apply queries in C# code, so in entity framework mostly we all are use LINQ or lambda expression queries, but still, sometimes we need to add custom SQL Queries. use using the below code you can achieve that. Eg: our table name … Read more

How to use Lamar in ASP. Net core web application or Web API

In this article, we will learn How to use Lamar in ASP. Net core web application or Web API. Why we use Lamar to implement dependency injection: There are lots of dependency injection containers in the .Net technology. The biggest disadvantage is the performance problem. The Lamar in this article is very lightweight and provides … Read more

HttpContext Access in outside of framework another class library services .NET CORE

Issue: We do not have access to HttpContext outside of Controller, Base Controller, and Middleware, But some time we need that in services or another Class library for access Headers or any other thing. So just look at how to achieve it. Add IHttpContextAccessor in Startup.cs file 2. Then simply on which service you would … Read more

.net core implements JWT Token with Razor pages | Plus solve early logout issue

Problem: If we use claims with cookies authentication, when we host to shared hosting or some other side then its IIS server log out earlier while we applied session time out or idle time out Secondly, we will learn how to use JWT Token with Razor pages, so both things will be achieved with this … Read more

Resolved: Entity Framework .net 5 core rename to table column | alter rename column in .net core EF.

The issue was supposed we have one User table and it has some columns like Id, FirstName, Surname, PhoneNumber, or Email. There we wanted to Rename Surname to LastName. The problem occurs when we will run migration after the above Change. It will not make rename or alter to the column, It will Drop to … Read more

How to use Entity Framework Migrations | Code First approach | .net core MVC code first

Summary: As you know in the Entity framework we have many ways to connect with the database from our application. We are using their Model first approach, Database first approach, and Code First approach.All approaches have different ways to use or Different requirement to use. The main thing is why we use this or which … Read more

Difference between .NET Standard, .NET Core, and .Net Framework Class Libraries?

As you know when the .net core was launch from that time we have a .net core, net Standard new libraries are available in vs. .net framework class library is old one which having .net framework 3.5, 4.0, 5,6 etc. .net core class library is totally we using for .net core projects. .net standard having … Read more