본문 바로가기
개발언어/ASP.NET Core

EntityFramework 관련 주소 링크

by 후쮸아빠 2020. 4. 16.

 

 

1. EF의 DbContext.ExecuteSqlCommand 관련 트랜잭션 처리

https://entityframework.net/ko/knowledge-base/24704953/

 

EF의 DbContext.ExecuteSqlCommand ()를 사용하는 트랜잭션 중 예외

try-catch 구조를 사용하여 예외가 트랜잭션의 임의의 지점에서 발견 된 경우 수행 할 작업을 파악하려고합니다. 코드 한 샘플 아래 : try { DbContext.ExecuteSqlCommand("BEGIN TRANSACTION"); //Line 1 DBContext.ExecuteSqlCommand("Some Insertion/Deletion Goes Here"); //Line 2 DbContext.ExecuteSqlCommand("COMMIT");

entityframework.net

 

2. EF에서 Stored Procedure 처리

https://www.entityframeworktutorial.net/efcore/working-with-stored-procedure-in-ef-core.aspx

 

Working with Stored Procedure in Entity Framework Core

Working with Stored Procedure in Entity Framework Core Here, you will learn how to execute the database stored procedure in Entity Framework Core. EF Core provides the following methods to execute a stored procedure: DbSet .FromSql() DbContext.Database.Exe

www.entityframeworktutorial.net

 

3. EF에서 DataTable 사용하기

https://gunnarpeipman.com/aspnet-core-reporting-dataset-datatable/

 

DataSet and DataTable based ad-hoc reporting with ASP.NET Core

Building simple and effective ad-hoc reports in ASP.NET Core using raw SQL queries and common views for DataSet and DataTable.

gunnarpeipman.com

https://gunnarpeipman.com/ef-core-execute-raw-sql/

 

Execute raw SQL commands in Entity Framework Core

How to run raw SQL commands in Entity Framework Core and how to read data from database using raw SQL. How to use ADO.NET classes in database context.

gunnarpeipman.com