Would it be possible to have the enum setter methods explicity do a cast (in MiniProfiler.cs and SqlTiming.cs)? MySql is being a nerd and has difficulties casting from tinyint to Enum.
I’m assuming it would go something like this:
private ProfileLevel _level;
/// <summary>
/// Allows filtering of <see cref="Timing"/> steps based on what <see cref="ProfileLevel"/>
/// the steps are created with.
/// </summary>
[DataMember(Order = 5)]
public ProfileLevel Level
{
get
{
return _level;
}
set
{
_level = (ProfileLevel)((int)value);
}
}
This would apply to SqlTimings.ExecuteType as well.
Currently I’m using Dapper to pull the data from MySql, and I’m having to map each property by hand in order to handle this casting issue.