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); }
public Query(Factory factory, string query) { this.baseQuery = new BaseQuery(factory, CommandType.Text, query); }