Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Connection dynamicly #24

Open
jhewitt0 opened this issue Oct 11, 2020 · 1 comment
Open

Setting Connection dynamicly #24

jhewitt0 opened this issue Oct 11, 2020 · 1 comment

Comments

@jhewitt0
Copy link

jhewitt0 commented Oct 11, 2020

I'm pleasantly surprised to discover ES is alive! Was a long time supporter/user, actually still using ES 2012.

I'm now trying to re-use my currently created ES objects from our ASP application which we are migrating to MVC with the new version of ES, so far only minor changes have needed to be done to some custom classes but the generated classes are working as is, so far. What I'm running into is an issue trying to figure out how to dynamically set the ES objects connection. Our application is basically a multi-tenant application and needs to set the connection based on who is logged in. I was thinking I could use the EntitySpaces.Interfaces.esConnection.ConnectionService but that doesn't seem to be working. I know I could set the connection in the Global.asax file but like I said I need the connection to be dynamically set. Was hoping for some pointers on the best was to accomplish this in an MVC application using ES. I'm guessing I could set the EntitySpaces.Interfaces.esConnectionElement when users log into the system but not sure that's the best way?

Side note: I used to be able to set the connection name on the classes also and that isn't working either.
collection.es.Connection.Name = connectionName and the connection name we were setting would be one of the connection names set in the webconfig file in the EntitySpaces section. But from the documation website it doesn't look like we can set that up and use that method anymore?

Thanks,

@MikeGriffinReborn
Copy link
Owner

Let me look into this for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants