- 优化 枚举属性的默认值容错,枚举下标不存在 0 的时候,mysql 迁移结构默认值报错;

This commit is contained in:
28810
2019-10-09 16:56:24 +08:00
parent 236d03f98c
commit 1f2d4abdc7
3 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;
namespace FreeSql.Tests.MySqlConnector
{
public class UnitTest1
{
public class TestAddEnum
{
public Guid Id { get; set; }
public TestAddEnumType Type { get; set; }
public PermissionTypeEnum TestType { get; set; }
}
public enum TestAddEnumType { , }
public enum PermissionTypeEnum
{
/// <summary>
/// 菜单
/// </summary>
Menu = 1,
/// <summary>
/// 接口
/// </summary>
Api = 2
}
[Fact]
public void Test1()
{
g.mysql.Select<TestAddEnum>().ToList();
}
}
}