Ejemplo n.º 1
0
        public StoredProcedure(Factory factory, string query)
        {
            string tmpQuery = query.Trim();

            if (tmpQuery.IndexOf(' ') >= 0)
            {
                if (tmpQuery[0] != '[' || tmpQuery[tmpQuery.Length - 1] != ']')
                {
                    throw new ArgumentException(query + " is not a valid stored procedure name!");
                }
            }
            this.baseQuery = new BaseQuery(factory, CommandType.StoredProcedure, query);
        }
Ejemplo n.º 2
0
 public Query(Factory factory, string query)
 {
     this.baseQuery = new BaseQuery(factory, CommandType.Text, query);
 }