Table alias in linq edmx

I am trying to replicate what it would be like with a stored procedure.

I have a set of tables: acem__main
acem__child
beta__main
beta_child
xyz__main
xyz__child

In my edmx, I have acem_main and acem_child linked via primary / secondary key.

However, depending on who is logging in, I would like to use the data from either acem, beta or xyz.

I can't imagine how to do this in linq - can anyone help?

0


a source to share


1 answer


Create a method that returns IEnumerable and takes the user as arguments. In the method, create three Linq queries for acem, beta or xyz and return the result from the query that matches the given user.



0


a source







All Articles