public SQLCE_MSSQL(string sqlCE_ConnectionString, string mssql_ConnecitonString, string table) { _SqlCE_ConnectionString = sqlCE_ConnectionString; _MSSQL_ConnectionString = mssql_ConnecitonString; _Table = table; _SqlCEContext = new DBTableDataSourceBase <E, K>(_SqlCE_ConnectionString, table); _MSSQLContext = new DBTableDataSourceBase <E, K>(_MSSQL_ConnectionString, table); }
public RepositoryBase() { //change this if necessary this.TableName = typeof(E).Name; this.ConnectionString = "DefaultConnection"; tableAccess = new DBTableDataSourceBase <E, K>(this.ConnectionString, this.TableName); }
public void insert(object o,string tipo) { if(tipo.Equals("usuario")) { var needleTailContext = new DBTableDataSourceBase<Usuario, int>("connectionString", "usuario"); needleTailContext.Insert((Usuario)o); } if (tipo.Equals("tarea")) { } }
/* First version of Needletail tools. Don't forget to check the documentation: [url:https://needletailtools.codeplex.com/documentation] *This is release is beta, but a few live sites are using this on their production environments * */ static void Main(string[] args) { //Force Migration on on application startup Migrator.Migrate("localConnectionString"); Console.WriteLine("Done Migrating"); Console.ReadKey(); var context = new DBTableDataSourceBase<Task ,Guid>("localConnectionString", "Tasks"); //Insert a new task context.Insert(new Task { TaskId = Guid.NewGuid(), CreatedOn = DateTime.Now, DueOn = DateTime.Now.AddDays(10), Name= "Sample Task", Description="This is a sample task"}); }
private bool MoveDataBetweenServers(DBTableDataSourceBase <E, K> source, DBTableDataSourceBase <E, K> target, object where, Needletail.DataAccess.Engines.FilterType filterType) { //get the data to move var toMove = source.GetMany(where, filterType, null, null); foreach (var e in toMove) { //insert the data target.Insert(e); } //delete the data return(source.Delete(where, filterType)); }
/* * First version of Needletail tools. * * Don't forget to check the documentation: * [url:https://needletailtools.codeplex.com/documentation] * * This is release is beta, but a few live sites are using this on their production environments * * */ static void Main(string[] args) { //Force Migration on on application startup Migrator.Migrate("localConnectionString"); Console.WriteLine("Done Migrating"); Console.ReadKey(); var context = new DBTableDataSourceBase <Task, Guid>("localConnectionString", "Tasks"); //Insert a new task context.Insert(new Task { TaskId = Guid.NewGuid(), CreatedOn = DateTime.Now, DueOn = DateTime.Now.AddDays(10), Name = "Sample Task", Description = "This is a sample task" }); }
private void InitializeDataSource() { dataSource = new DBTableDataSourceBase <Crmuser, Guid>(this.ConnectionString, this.TableName); }
private void InitializeDataSource() { dataSource = new DBTableDataSourceBase <EmailMessages, Guid>(this.ConnectionString, this.TableName); }