IRepositories Join in Subsonic
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 Vi开发者_StackOverflow中文版ew();
}
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 :)
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.
精彩评论