문제

i´m using LINQ with the subsonic in a class to get my data here is the code below:

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

        }

You will see one difference in line at "v.Marca.Ativo == true", I did one modification in template of ActiveRecord to get a Object and not a IQueryable.

This is the code modified in the template generated:

public Marca Marca
    {
        get
        {

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

in the Code it´s ok, but this Select return this Execution time Error:

The member 'TestMode' is not supported.

I did not founded nothing in the Net about this error.

Many Thanks

도움이 되었습니까?

해결책

This is a bug, it's logged in the issue list on github and is being worked on at the moment. See the link below for details:

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top