-
Dapper
- Getting Started
- Methods
- Parameters
- Result
- Utilities
-
Dapper Plus
- Getting Started
- Methods
-
Dapper Contrib
- Getting Started
- Methods
- Data Annotations
Dapper Tutorial Dapper Contrib - 삭제
기술
하나 또는 여러 엔티티를 삭제합니다.
예 - 단일 삭제
하나의 자격을 삭제하십시오.
using (var connection = My.ConnectionFactory()) { connection.Open(); var isSuccess = connection.Delete(new Invoice {InvoiceID = 1}); }
예 - 많은 삭제
많은 엔티티를 삭제합니다.
using (var connection = My.ConnectionFactory()) { connection.Open(); var list = new List<Invoice>() { new Invoice {InvoiceID = 1}, new Invoice {InvoiceID = 2}, new Invoice {InvoiceID = 3} }; var isSuccess = connection.Delete(list); }