Commit 8b0520c6 authored by shrayasr's avatar shrayasr

Adding section about SQLite limitation

More information at #300
parent 17c45b19
...@@ -125,3 +125,20 @@ Dapper.Contrib makes use of some optional attributes: ...@@ -125,3 +125,20 @@ Dapper.Contrib makes use of some optional attributes:
* `[Write(true/false)]` - this property is (not) writeable * `[Write(true/false)]` - this property is (not) writeable
* `[Computed]` - this property is computed and should not be part of updates * `[Computed]` - this property is computed and should not be part of updates
Limitations and caveats
-------
### SQLite
`SQLiteConnection` exposes an `Update` event that clashes with the `Update` extension provided by Dapper.Contrib. There are 2 ways to deal with this.
1. Call the `Update` method explicitly from `SqlMapperExtensions`
```Csharp
SqlMapperExtensions.Update(_conn, new Employee { Id = 1, Name = "Mercedes" });
```
2. Make the method signature unique by passing a type parameter to `Update`
```Csharp
connection.Update<Car>(new Car() { Id = 1, Name = "Maruti" });
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment