markrendle/Simple.Data — Issue #150: Insert() returns null on Simple.Data.Mysql on Mono 2.10.8
Author: nidheeshdas
Created: 2012-02-15 06:19:52+00:00
State: open

Mysql => 5.1.44
Simple.Data => 0.12.2.2
Simple.Data.Ado => 0.12.2.2
Simple.Data.Mysql.Myql40 => 0.12.2.1
Mysql.Data => 6.4.4.0
Mono 2.10.8 on Mac 10.6

All obtained from nuget

var db = Database.Open();
var user = db.Users.Insert(name: "abs" , age: 21 );

Insert() returns null

output of show columns in users
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| name | varchar(255) | YES | | NULL | |
| age | int(11) | YES | | NULL | |
| Id | int(11) | NO | PRI | NULL | auto_increment |
+-------+--------------+------+-----+---------+----------------+
3 rows in set (0.00 sec)

But all works well in Windows.

I think the problem is in In Simple.Data => Extensions/BinderExtensions.cs : line 35

it worked when
ResultDiscardedGetter = ResultDiscardedGetter ?? (_ => true);
is changed to
ResultDiscardedGetter = ResultDiscardedGetter ?? (_ => false);