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

Separate write and read commands using SessionFactoryAttribute #150

Closed
AlexanderSysoev opened this issue Jul 25, 2016 · 1 comment
Closed
Assignees

Comments

@AlexanderSysoev
Copy link

AlexanderSysoev commented Jul 25, 2016

Hello!
I use SessionFactoryAttribute in my repository to read and write enitites from one session. I want change my database to slave and master. I want write entites to master and read them from slave. Is there any approach to implement this using SessionFactoryAttribute? May be there is a better solution?

@AlexanderSysoev AlexanderSysoev changed the title Separate write and read commands using SessionFactoryKeyAttribute Separate write and read commands using SessionFactoryAttribute Jul 26, 2016
@cd21h cd21h self-assigned this Jul 26, 2016
@cd21h
Copy link

cd21h commented Jul 26, 2016

Hi Alex,
SessionFactoryKey will be removed in v4.

I suggest to register named ISession instances / repositories.

Please take a look at https://github.com/sharparchitecture/Sharp-Architecture/blob/develop/Solutions/SharpArch.NHibernate/NHibernateSessionFactoryBuilder.cs and Samples/TardisBank on develop branch

@cd21h cd21h closed this as completed Sep 18, 2016
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