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?