mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 09:15:27 +08:00 
			
		
		
		
	- 补充 当初始化 ConnectionString 参数为空时,给出友好错误提示;
This commit is contained in:
		@@ -123,9 +123,18 @@ namespace FreeSql.Tests {
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public class TestEnum {
 | 
			
		||||
			public Guid id { get; set; }
 | 
			
		||||
			public Enum em { get; set; }
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		[Fact]
 | 
			
		||||
		public void Test1() {
 | 
			
		||||
 | 
			
		||||
			
 | 
			
		||||
			g.sqlite.Insert(new TestEnum { }).ExecuteAffrows();
 | 
			
		||||
			var telist = g.sqlite.Select<TestEnum>().ToList();
 | 
			
		||||
 | 
			
		||||
			Assert.Throws<Exception>(() => g.sqlite.CodeFirst.SyncStructure<TestEnumable>());
 | 
			
		||||
 | 
			
		||||
			var TestEnumable = new TestEnumable();
 | 
			
		||||
 
 | 
			
		||||
@@ -103,6 +103,7 @@ namespace FreeSql {
 | 
			
		||||
 | 
			
		||||
		public IFreeSql Build() => Build<IFreeSql>();
 | 
			
		||||
		public IFreeSql<TMark> Build<TMark>() {
 | 
			
		||||
			if (string.IsNullOrEmpty(_masterConnectionString)) throw new Exception("参数 masterConnectionString 不可为空,请检查 UseConnectionString");
 | 
			
		||||
			IFreeSql<TMark> ret = null;
 | 
			
		||||
			Type type = null;
 | 
			
		||||
			switch(_dataType) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user