mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 09:15:27 +08:00 
			
		
		
		
	v0.1.14
- 增加 延时属性编译错误信息; - 优化 FreeSql.Repository Autofac 泛型注入;
This commit is contained in:
		@@ -449,8 +449,13 @@ namespace FreeSql.Internal {
 | 
			
		||||
				}
 | 
			
		||||
				if (overrieds > 0) {
 | 
			
		||||
					cscode.AppendLine("}");
 | 
			
		||||
					var assemly = Generator.TemplateEngin._compiler.Value.CompileCode(cscode.ToString());
 | 
			
		||||
					var type = assemly.DefinedTypes.Where(a => a.FullName.EndsWith(trytbTypeLazyName)).FirstOrDefault();
 | 
			
		||||
					Assembly assembly = null;
 | 
			
		||||
					try {
 | 
			
		||||
						assembly = Generator.TemplateEngin._compiler.Value.CompileCode(cscode.ToString());
 | 
			
		||||
					} catch (Exception ex) {
 | 
			
		||||
						throw new Exception($"【延时加载】{trytbTypeName} 编译错误:{ex.Message}\r\n\r\n{cscode}");
 | 
			
		||||
					}
 | 
			
		||||
					var type = assembly.DefinedTypes.Where(a => a.FullName.EndsWith(trytbTypeLazyName)).FirstOrDefault();
 | 
			
		||||
					trytb.TypeLazy = type;
 | 
			
		||||
					trytb.TypeLazySetOrm = type.GetProperty("__fsql_orm__", BindingFlags.Instance | BindingFlags.NonPublic).GetSetMethod(true);
 | 
			
		||||
				}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user