Beispiel #1
0
 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);
        }
Beispiel #3
0
 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"});
        }
Beispiel #5
0
        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));
        }
Beispiel #6
0
        /*
         * 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"
            });
        }
Beispiel #7
0
 private void InitializeDataSource()
 {
     dataSource = new DBTableDataSourceBase <Crmuser, Guid>(this.ConnectionString, this.TableName);
 }
Beispiel #8
0
 private void InitializeDataSource()
 {
     dataSource = new DBTableDataSourceBase <EmailMessages, Guid>(this.ConnectionString, this.TableName);
 }