Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

dapper delete where in list

The syntax for List<> support in dapper is slightly different than in an actual T-SQL query. See: https://github.com/StackExchange/Dapper

DELETE FROM [Employee] 
WHERE EmployeeId in @empIds
It does not require braces around the IN clause's parameter. And you can just pass an IEnumerable<>. Like this

new { empIds = new[] { Guid.NewGuid(), Guid.NewGuid() } }
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# datatable copy selected rows to another table 
Csharp :: C# executing assembly path 
Csharp :: camera follow player 
Csharp :: remove first object from list c# 
Csharp :: shorthand in c# operator 
Csharp :: how to make a object disapear in windows form c# 
Csharp :: how to generate random letters in C# 
Csharp :: how to convert a number to 2 decimal places in c# 
Csharp :: monogame fullscreen 
Csharp :: ensuresuccessstatuscode exception 
Csharp :: detect trigger in unity 
Csharp :: fair division 
Csharp :: how to store user input into list c# 
Csharp :: exit a method c# 
Csharp :: C# Cast double to float 
Csharp :: rotation facing mouse unity 
Csharp :: how to check if string can be converted to int c# 
Csharp :: c# create instance from type 
Csharp :: regex c# password numbers and letters 
Csharp :: unity up arrow input 
Csharp :: loop through all enum values in C# 
Csharp :: unity json save array 
Csharp :: video gets pixelated by scaling it up to Screen Size unity 
Csharp :: wpf get screen size 
Csharp :: c# find one object in list where 
Csharp :: get execution directory c# 
Csharp :: jarray to list c# 
Csharp :: unity hide mesh 
Csharp :: how to get the date of the first day and last day of the week c# 
Csharp :: prevent page refresh 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =