dotConnect seems to fail with Dapper ORM.
Posted: Fri 22 Jul 2016 21:32
Was using Sql Server with Dapper to do basic data crud. After switch to dotConnect and mysql the syntax is failing. I'm executing the following code which used to work:
It now gives the thrown exception:
Exception thrown: 'Devart.Data.MySql.MySqlException' in Devart.Data.dll
Additional information: Column 'Id' cannot be null
Do I need to do something different to make this work, or is it unsupported in dotConnect?
Code: Select all
using (var MySqlConnection = new MySqlConnection(IndexConnectionString))
{
RootBucket newBucket = new RootBucket
{
Id = name.GetHashCode(),
Name = name
};
MySqlConnection.Open();
MySqlConnection.Execute("INSERT IndexerRootBucket(Id, Name) VALUES (@Id, @Name);", newBucket);
return newBucket;
}
Exception thrown: 'Devart.Data.MySql.MySqlException' in Devart.Data.dll
Additional information: Column 'Id' cannot be null
Do I need to do something different to make this work, or is it unsupported in dotConnect?