Пример #1
0
 /// <summary>
 /// Configures the current domain to connect to a SQLite database with a specified connection string.
 /// </summary>
 /// <param name="options">A <see cref="DomainOptions"/> instance from the <see cref="IDomain.Configure(DomainOptions)"/> method.</param>
 /// <param name="connectionString">Connection string specifying the details of the connection.</param>
 public static void UseSqlite(this DomainOptions options, string connectionString)
 {
     options.ConnectionFactory = () => new SqliteConnection(connectionString);
     options.Schemas.AddContract(new SqliteContractResolver());
 }
Пример #2
0
 public static void UseJson(this DomainOptions options) => options.UseJson(null);
Пример #3
0
 /// <summary>
 /// Configures the current domain to connect to a MySQL database with a specified connection string.
 /// </summary>
 /// <param name="options">A <see cref="DomainOptions"/> instance from the <see cref="IDomain.Configure(DomainOptions)"/> method.</param>
 /// <param name="connectionString">Connection string specifying the details of the connection.</param>
 public static void UseMySql(this DomainOptions options, string connectionString)
 {
     options.ConnectionFactory = () => new MySqlConnection(connectionString);
     options.Schemas.AddContract(new MySqlContractResolver());
     options.Dialect = new MySqlDialect();
 }