- 优化 ICodeFirst.SyncStructure 错误提示,当使用不可迁移实体时;

This commit is contained in:
28810
2019-05-21 15:57:19 +08:00
parent 5a69128807
commit d54b245ba5
7 changed files with 37 additions and 11 deletions

View File

@ -9,6 +9,7 @@ using NpgsqlTypes;
using Npgsql.LegacyPostgis;
using System.Linq.Expressions;
using System.Threading.Tasks;
using System.Collections;
namespace FreeSql.Tests {
public class UnitTest1 {
@ -112,9 +113,24 @@ namespace FreeSql.Tests {
}
public class TestEnumable : IEnumerable<TestEnumable> {
public IEnumerator<TestEnumable> GetEnumerator() {
throw new NotImplementedException();
}
IEnumerator IEnumerable.GetEnumerator() {
throw new NotImplementedException();
}
}
[Fact]
public void Test1() {
g.sqlite.CodeFirst.SyncStructure<TestEnumable>();
var TestEnumable = new TestEnumable();
g.sqlite.GetRepository<Model1, int>().Insert(new Model1 {
title = "test_" + DateTime.Now.ToString("yyyyMMddHHmmss"),
M2Id = DateTime.Now.Second + DateTime.Now.Minute,