新增查询数据链接和检测是否可以链接数据库!
This commit is contained in:
		
							parent
							
								
									a17d7697e6
								
							
						
					
					
						commit
						1e07de9184
					
				@ -2,6 +2,7 @@
 | 
			
		||||
using SqlSugar;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Data;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
 | 
			
		||||
@ -266,5 +267,15 @@ namespace Falcon.SugarApi.DatabaseDefinitions
 | 
			
		||||
        public DateTime DbDateTime {
 | 
			
		||||
            get => SqlFunc.GetDate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 数据库链接
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public IDbConnection Connection => this.Ado.Connection;
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 是否可以成功连接数据库
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public bool Connected => this.Ado.IsValidConnection();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user