public Grove.EntityData GetObjectSource(ObjectQuery query) { m_db.OP = new ObjectOperator(m_connString); m_db.OP.DbOperator.ClearParameters(); Grove.EntityData ret = m_db.OP.GetObjectSource(query); m_db.OP.Dispose(); return(ret); }
/// <summary> /// EntityData result = oo.GetObjectSource ( new ObjectQuery ( typeof ( Customer ) , "" ) ); /// /// </summary> public Grove.EntityData GetObjectSource(string filter, string subsetFilter) { m_db.OP = new ObjectOperator(m_connString); m_db.OP.DbOperator.ClearParameters(); ObjectQuery query = new ObjectQuery(GetType(), filter); query.DeclareSubset(GetType(), subsetFilter); Grove.EntityData ret = m_db.OP.GetObjectSource(query); m_db.OP.Dispose(); return(ret); }
/// <summary> /// ArrayList customers = oo.GetObjectSet ( new ObjectQuery ( typeof ( Customer ) , "" ) ); /// </summary> public ArrayList GetObjectSet(string filter, string subsetFilter) { m_db.OP = new ObjectOperator(m_connString); m_db.OP.DbOperator.ClearParameters(); // ObjectQuery query = new ObjectQuery(GetType(), filter); // query.DeclareSubset(GetType(),subsetFilter); Grove.EntityData temp = GetObjectSource(filter, subsetFilter); ArrayList ret = Grove.Util.EntityUtil.ToObjects(temp, GetType()); m_db.OP.Dispose(); return(ret); // return m_db.OP.GetObjectSet(query); }
public List <T> GetObjectList(string filter) { m_db.OP = new ObjectOperator(m_connString); List <T> ret = new List <T>(); m_db.OP.DbOperator.ClearParameters(); ObjectQuery query = new ObjectQuery(GetType(), filter); Grove.EntityData temp = GetObjectSource(filter); ArrayList array = Grove.Util.EntityUtil.ToObjects(temp, GetType()); if (array != null) { foreach (T t in array) { t.ConnString = m_connString; ret.Add(t); } } m_db.OP.Dispose(); return(ret); }