Exemplo n.º 1
0
        public override void MountQuery(IDataShape model)
        {
            string query = String.Format("DELETE FROM [{0}] WHERE {1}",
                                        model.GetType().Name,
                                        String.Join(", ", this._list.ToArray()));

            this._command = this._dbDao.GetSqlCommand(query);
        }
Exemplo n.º 2
0
        public override void MountQuery(IDataShape model)
        {
            string query = String.Format("UPDATE [{0}] SET {1} WHERE [Id] = @Id",
                                        model.GetType().Name,
                                        String.Join(", ", this._list.ToArray()));

            this._command = this._dbDao.GetSqlCommand(query);
        }
Exemplo n.º 3
0
        public override void MountQuery(IDataShape model)
        {
            string query = String.Format("DELETE FROM [{0}] WHERE {1}",
                                         model.GetType().Name,
                                         String.Join(", ", this._list.ToArray()));

            this._command = this._dbDao.GetSqlCommand(query);
        }
Exemplo n.º 4
0
        public override void MountQuery(IDataShape model)
        {
            string query = String.Format("UPDATE [{0}] SET {1} WHERE [Id] = @Id",
                                         model.GetType().Name,
                                         String.Join(", ", this._list.ToArray()));

            this._command = this._dbDao.GetSqlCommand(query);
        }
Exemplo n.º 5
0
        public override void MountQuery(IDataShape model)
        {
            string query = String.Format("INSERT INTO [{0}] ( {1} ) VALUES ( {2} )",
                                        model.GetType().Name,
                                        String.Join(", ", this._dictionary.Keys),
                                        String.Join(", ", this._dictionary.Values));

            this._command = this._dbDao.GetSqlCommand(query);
        }
Exemplo n.º 6
0
        public override void MountQuery(IDataShape model)
        {
            string query = String.Format("INSERT INTO [{0}] ( {1} ) VALUES ( {2} )",
                                         model.GetType().Name,
                                         String.Join(", ", this._dictionary.Keys),
                                         String.Join(", ", this._dictionary.Values));

            this._command = this._dbDao.GetSqlCommand(query);
        }
Exemplo n.º 7
0
        public override void MountQuery(IDataShape model)
        {
            string query = String.Format("SELECT * FROM [{0}] {1} {2}",
                                         model.GetType().Name,
                                         this._list.ToArray().Length > 0 ? "WHERE" : "",
                                         String.Join(" AND ", this._list.ToArray()));

            this._command = this._dbDao.GetSqlCommand(query);
        }