2010-02-26 70 views
1
在一個類中使用LINQ以亞音速在這裏得到我的數據

i'm是下面的代碼:亞音速例外 - 成員「測試模式」不支持

public IQueryable<Veiculo> SelecionaVeiculosSite() 
     { 
        return (from v in _db.Veiculos 
          where v.Ativo == true && 
          v.Marca.Ativo == true && 
          v.Modelo.Ativo == true 
          select v 
          );    

     } 

你會看到相符的一個區別「v.Marca.Ativo == true」,我在ActiveRecord模板中做了一個修改,以獲得一個對象而不是IQueryable。

這是發生在模板修改代碼:在代碼

public Marca Marca 
    { 
     get 
     { 

       var repo=OKMMySql.Marca.GetRepo(); 
       return (from items in repo.GetAll() 
        where items.ID_Marca == _ID_Marca 
        select items).SingleOrDefault(); 
     } 
    } 

it's OK,但這種選擇回這個執行時間錯誤:

The member 'TestMode' is not supported.

我沒有什麼成立在網絡中關於這個錯誤。

非常感謝

回答

2

這是一個錯誤,它記錄在GitHub上的問題清單,在目前正在開發中。請參見下面的鏈接瞭解詳細信息:

http://github.com/subsonic/SubSonic-3.0/issues/148

+0

感謝亞當我foud在您指定的鏈接的解決方案。在Subsonic.Core中是個問題 – Myr0 2010-03-01 17:23:19