Esempio n. 1
0
        public virtual void Insert(TEntity entity)
        {
            QueueSql.Sql = new StringBuilder();
            var strinsertAssemble = Visit.Insert(entity);

            QueueSql.Sql.AppendFormat("INSERT INTO {0} {1}", QueueSql.Name, strinsertAssemble);
        }
Esempio n. 2
0
        public virtual Queue Insert <TEntity>(TEntity entity) where TEntity : class, new()
        {
            Queue.Sql = new StringBuilder();
            var strinsertAssemble = Visit.Insert(entity);

            Queue.Sql.AppendFormat("INSERT INTO {0} {1}", Queue.Name, strinsertAssemble);
            return(Queue);
        }
 protected override SqlCaluse Insert(NewExpression exp, SqlCaluse sqlCaluse)
 {
     for (int i = 0; i < exp.Members.Count; i++)
     {
         var member = exp.Members[i];
         var name   = member.GetAttribute <ColumnNameAttribute>()?.Name ?? member.Name;
         sqlCaluse.SelectFields.Add(name);
         ExpressionVisit.Insert(exp.Arguments[i], sqlCaluse);
     }
     return(sqlCaluse);
 }
Esempio n. 4
0
 protected override SqlCaluse Insert(UnaryExpression exp, SqlCaluse sqlCaluse)
 {
     ExpressionVisit.Insert(exp.Operand, sqlCaluse);
     return(sqlCaluse);
 }