Ejemplo n.º 1
0
 public static void UseMySqlData(this IServiceCollection serviceCollection, MySqlDataOptions options)
 {
     serviceCollection.AddSingleton(options);
     serviceCollection.AddSingleton <IConnectionStringProvider, ConnectionStringProvider>();
     serviceCollection.AddSingleton <IConnectionProvider, MySqlConnectionProvider>();
     serviceCollection.AddSingleton <IDataContextProvider, MySqlDataContextProvider>();
 }
Ejemplo n.º 2
0
 public ConnectionStringProvider(MySqlDataOptions options)
 {
     _options = options;
 }