Working in migration to linq2SQL
This commit is contained in:
36
UserService.DatabaseLayer/DataModels/Class1.cs
Normal file
36
UserService.DatabaseLayer/DataModels/Class1.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using LinqToDB.Configuration;
|
||||
|
||||
namespace DataModels
|
||||
{
|
||||
public class ConnectionStringSettings : IConnectionStringSettings
|
||||
{
|
||||
public string ConnectionString { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string ProviderName { get; set; }
|
||||
public bool IsGlobal => false;
|
||||
}
|
||||
|
||||
public class MySettings : ILinqToDBSettings
|
||||
{
|
||||
public IEnumerable<IDataProviderSettings> DataProviders => Enumerable.Empty<IDataProviderSettings>();
|
||||
|
||||
public string DefaultConfiguration => "MySqlServer";
|
||||
public string DefaultDataProvider => "MySqlServer";
|
||||
|
||||
public IEnumerable<IConnectionStringSettings> ConnectionStrings
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return
|
||||
new ConnectionStringSettings
|
||||
{
|
||||
Name = "Northwind",
|
||||
ProviderName = "MySqlServer",
|
||||
ConnectionString = @"Server=srvbo;Database=UserService;Uid=UserDbAdmin;Pwd=12345678;"
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user