Adding new DatabaseConfig components in the Client project for supported Databases to avoid deploying server dlls to client

This commit is contained in:
Charles Nurse
2021-04-27 15:35:10 -07:00
parent 8f5beaf3fe
commit 1efd623a99
19 changed files with 664 additions and 303 deletions

View File

@ -14,12 +14,7 @@ namespace Oqtane.Repository.Databases
private static string _name => "Sqlite";
private static readonly List<ConnectionStringField> _connectionStringFields = new()
{
new() {Name = "Server", FriendlyName = "File Name", Value = "Oqtane-{{Date}}.db", HelpText="Enter the file name to use for the database"}
};
public SqliteDatabase() :base(_name, _friendlyName, _connectionStringFields) { }
public SqliteDatabase() :base(_name, _friendlyName) { }
public override string Provider => "Microsoft.EntityFrameworkCore.Sqlite";
@ -28,20 +23,6 @@ namespace Oqtane.Repository.Databases
return table.Column<int>(name: name, nullable: false).Annotation("Sqlite:Autoincrement", true);
}
public override string BuildConnectionString()
{
var connectionstring = String.Empty;
var server = ConnectionStringFields[0].Value;
if (!String.IsNullOrEmpty(server))
{
connectionstring = $"Data Source={server};";
}
return connectionstring;
}
public override string ConcatenateSql(params string[] values)
{
var returnValue = String.Empty;