Updte literal example to be a bit better

This commit is contained in:
Nick Craver
2018-09-11 22:28:11 -04:00
parent d702fb82eb
commit 48f6754ad6
+1 -1
View File
@@ -202,7 +202,7 @@ Literal replacements
Dapper supports literal replacements for bool and numeric types.
```csharp
connection.Query("select * from User where UserId = {=Id}", new {Id = 1}));
connection.Query("select * from User where UserTypeId = {=Admin}", new { UserTypeId.Admin }));
```
The literal replacement is not sent as a parameter; this allows better plans and filtered index usage but should usually be used sparingly and after testing. This feature is particularly useful when the value being injected