mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Add Check
This commit is contained in:
@@ -280,6 +280,10 @@ namespace SqlSugar
|
||||
public override bool CreateDatabase(string databaseName, string databaseDirectory = null)
|
||||
{
|
||||
var connString=this.Context.CurrentConnectionConfig.ConnectionString;
|
||||
if (connString == null)
|
||||
{
|
||||
throw new Exception("ConnectionString is null");
|
||||
}
|
||||
var path = Regex.Match(connString, @"[a-z,A-Z]\:\\.+\\").Value;
|
||||
if (path.IsNullOrEmpty())
|
||||
{
|
||||
|
Reference in New Issue
Block a user