Adding new DatabaseConfig components in the Client project for supported Databases to avoid deploying server dlls to client
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user