public override DataStore CreateDataStore() { SqlDataStore dataStore = new Inform.Sql.SqlDataStore(); dataStore.Name = "Main"; dataStore.Connection.ConnectionString = "server=localhost;database=Inform;uid=development;pwd=d3v3lopm3nt"; return dataStore; }
public override DataStore CreateDataStore() { SqlDataStore dataStore = new SqlDataStore(); dataStore.Connection.ConnectionString = "server=localhost;database=Inform;uid=development;pwd=d3v3lopm3nt"; dataStore.Settings.UseStoredProcedures = true; return dataStore; }
public void InitializeConnection() { dataStore = new SqlDataStore(); dataStore.Connection.ConnectionString = "server=localhost;database=Inform;uid=development;pwd=d3v3lopm3nt"; dataStore.Settings.AutoGenerate = true; dataStore.Settings.UseStoredProcedures = true; dataStore.CreateStorage(typeof(Employee)); Employee e = new Employee(); e.EmployeeID = "2"; e.FirstName = "Sam"; e.LastName = "Donaldson"; e.Title = "Director"; e.Salary = 70000; dataStore.Insert(e); Employee e2 = new Employee(); e2.EmployeeID = "3"; e2.FirstName = "Jim"; e2.LastName = "Davis"; e2.Title = "Director"; e2.Salary = 65000; dataStore.Insert(e2); }
/// <summary> /// Creates a new SqlObjectReader. /// </summary> internal SqlObjectReader(SqlDataStore dataStore, SqlDataReader reader, Type mappedType, bool polymorphic) { this.dataStore = dataStore; this.reader = reader; this.polymorphic = polymorphic; this.MappedType = mappedType; }
public SqlObjectAccessCommand(SqlDataStore dataStore, Type dynamicType, string cmdText, bool polymorphic, CommandType commandType) { this.dataStore = dataStore; this.cmdText = cmdText; this.polymorphic = polymorphic; this.dynamicType = dynamicType; this.commandType = commandType; if(commandType == CommandType.Text){ command = new SqlDataAccessCommand(dataStore, dataStore.DataStorageManager.CreateQuery(dynamicType, cmdText, polymorphic), commandType); } else { command = new SqlDataAccessCommand(dataStore, cmdText, commandType); } }
public SqlObjectAccessCommand(SqlDataStore dataStore, Type dynamicType, string filter, bool polymorphic) : this(dataStore, dynamicType, filter, false, CommandType.Text) { }
public SqlObjectAccessCommand(SqlDataStore dataStore, Type dynamicType, string filter) : this(dataStore, dynamicType, filter, false) { }
public SqlDataStorageManager(SqlDataStore dataStore) : base(dataStore) { AddDefaultPropertyMappingsTypes(); }
/// <summary> /// Creates the command as a specific command type. /// </summary> public SqlDataAccessCommand(SqlDataStore dataStore, string cmdText, System.Data.CommandType commandType) { this.dataStore = dataStore; this.command = new SqlCommand(cmdText); this.command.CommandType = commandType; }
/// <summary> /// Creates the command. /// </summary> public SqlDataAccessCommand(SqlDataStore dataStore, string cmdText) { this.dataStore = dataStore; this.command = new SqlCommand(cmdText); }
/// <summary> /// Creates a new SqlFindObject Command. /// </summary> /// <param name="storeProcedureName">The name of the stored procedure to call.</param> public SqlFindCollectionCommand(SqlDataStore dataStore, Type dynamicType, string filter, bool polymorphic) : base(dataStore, dynamicType, filter, polymorphic) { }
/// <summary> /// Creates a new SqlFindCollectionCommand Command. /// </summary> /// <param name="storeProcedureName">The name of the stored procedure to call.</param> /// <param name="dynamicObjectType">The type of object to populate dynamically.</param> public SqlFindCollectionCommand(SqlDataStore dataStore, Type dynamicType, String cmdText, CommandType commandType) : base(dataStore, dynamicType, cmdText, false, commandType) { }
/// <summary> /// Creates a new SqlFindCollectionCommand Command. /// </summary> /// <param name="storeProcedureName">The name of the stored procedure to call.</param> /// <param name="dynamicObjectType">The type of object to populate dynamically.</param> public SqlFindCollectionCommand(SqlDataStore dataStore, Type dynamicType, String filter ) : base(dataStore, dynamicType, filter) { }
/// <summary> /// Creates a new SqlFindObject Command. /// </summary> /// <param name="dynamicObjectType">The type of object to populate dynamically.</param> public SqlFindObjectCommand(SqlDataStore dataStore, Type dynamicType, string cmdText, bool polymorphic, System.Data.CommandType commandType) { this.dataStore = dataStore; this.m_command = new SqlObjectAccessCommand(dataStore, dynamicType, cmdText, polymorphic, commandType); }
/// <summary> /// Creates a new SqlFindObject Command. /// </summary> public SqlFindObjectCommand(SqlDataStore dataStore, Type dynamicType, string filter, bool polymorphic) : this(dataStore, dynamicType, filter, polymorphic, CommandType.Text) { }