views:

71

answers:

1

Hi i'm stuck with this doubt:
How do I make i Join with 2 IRepositories? look my controller...

public ActionResult Colaboradores(int baseid)
    {

        IRepository<Colaborador> _repocolab = new SubSonicRepository<Colaborador>();
        IRepository<Usuario> _repouser = new SubSonicRepository<Usuario>();




        return View();
    }

I need to join these IRepositories to get "Ativo" from Colaborador and "Nome" from Usuario making a Where in Colaborador with baseid parameter...

How can i do that??? Please :)

A: 

Unfortunately the repository pattern isn't going to provide you with the ability to query across two repositories.

One method which you might be able to use is to create a view in the database which contains all the properties you need and then get subsonic to create a class that reflects this view for you.

lomaxx
But how can I make subsonic create this class?
Antonio Dourado