Open LucaGabi opened 3 years ago
using MySql.Data.MySqlClient;
using Newtonsoft.Json;
using RepoDb;
using System;
using System.Collections.Generic;
namespace ConsoleApp6
{
public class Person
{
public long Id { get; set; }
public string Name { get; set; }
public int Age { get; set; }
public DateTime CAT { get; set; }
}
class Program
{
static void Main(string[] args)
{
MySqlBootstrap.Initialize();
var cns = "********************";
using (var connection = new MySqlConnection(cns))
{
var updatedRows = connection.Update("Person",
entity: new Dictionary<string, object> {
{ "Id",1 },
{ "Age",42 }
});
var ppls = connection.QueryAll<Person>();
foreach (var p in ppls)
{
Console.WriteLine(JsonConvert.SerializeObject(p));
}
}
Console.ReadKey();
Console.WriteLine("Hello World!");
}
}
}
Working with latest code
Bug Description
Update with Dictionary<string,object> fails using MySql/MariaDb
Exception Message:
Schema and Model:
Please share to us the schema of the table (not actual) that could help us replicate the issue if necessary.
And also the model that corresponds the schema.
Library Version:
Example: RepoDb v1.12.X and RepoDb.SqlServer v1.1.X