Exemple #1
0
 /// <summary>
 /// Opens the specified connection string settings.
 /// </summary>
 /// <param name="connectionStringSettings">A <see cref="System.Configuration.ConnectionStringSettings"/> object.</param>
 /// <returns>An instantiated and fully loaded <see cref="DynamicModel"/> object</returns>
 /// <example>
 /// <code>
 /// using System.Configuration;
 ///
 /// SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
 /// builder.DataSource = "localhost";
 /// builder.InitialCatalog = "Northwind";
 /// builder.IntegratedSecurity = true;
 ///
 /// var tble = DynamicModel.Open(new ConnectionStringSettings {
 /// 	Name = "MyConnectionString",
 /// 	ConnectionString = builder.ConnectionString
 /// });
 /// </code>
 /// </example>
 public static DynamicModel Open(ConnectionStringSettings connectionStringSettings)
 {
     dynamic dm = new DynamicModel(connectionStringSettings);
     return dm;
 }
Exemple #2
0
 /// <summary>
 /// Opens the specified connection string builder.
 /// </summary>
 /// <param name="connectionStringBuilder">A <see cref="System.Data.Common.DbConnectionStringBuilder"/> object.</param>
 /// <returns>An instantiated and fully loaded <see cref="DynamicModel"/> object</returns>
 /// <example>
 /// <code>
 /// using System.Configuration;
 ///
 /// SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
 /// builder.DataSource = "localhost";
 /// builder.InitialCatalog = "Northwind";
 /// builder.IntegratedSecurity = true;
 ///
 /// var tble = DynamicModel.Open(builder);
 /// </code>
 /// </example>
 public static DynamicModel Open(DbConnectionStringBuilder connectionStringBuilder)
 {
     dynamic dm = new DynamicModel(connectionStringBuilder);
     return dm;
 }
Exemple #3
0
 /// <summary>
 /// Opens the specified connection string name.
 /// </summary>
 /// <param name="connectionStringName">Name of the connection string.</param>
 /// <returns>An instantiated and fully loaded <see cref="DynamicModel"/> object</returns>
 /// <example>
 /// <code>
 /// var variable = new DynamicModel.Open("northwind");
 /// </code>
 /// </example>
 public static DynamicModel Open(string connectionStringName)
 {
     dynamic dm = new DynamicModel(connectionStringName);
     return dm;
 }