Exemplo n.º 1
0
        public EntityCollection <T> SelectDataByCondition(DbSearchConditionCollection <T> condition, bool useAop)
        {
            EntityCollection <T> result = new EntityCollection <T>(this);

            result.IsReadOnly = !useAop;
            using (DbConnection conn = _DataBase.CreateConnection())
            {
                conn.ConnectionString = _strConn;
                List <T> data = SqlMap <T> .GetDataByCondition(condition, conn, useAop, _DataBase);

                result.Add(data);
            }
            result.AcceptChanges();
            return(result);
        }