Serenity: New wiki entry

Created on 3 Aug 2018  路  16Comments  路  Source: serenity-is/Serenity

Hi all!

I write this new wiki entry to help people that search for multi database application instead multy tenancy database

https://github.com/volkanceylan/Serenity/wiki/One-application-with-different-database-per-customer

Most helpful comment

@Estrusco nicely done, i've created a different approach that I believe would be more beneficial to some developers, because of the way to access the database at the Login screen.

image

when it is 100% stable will make some wiki ;)

I believe in less code and more productivity....

All 16 comments

@Estrusco nicely done, i've created a different approach that I believe would be more beneficial to some developers, because of the way to access the database at the Login screen.

image

when it is 100% stable will make some wiki ;)

I believe in less code and more productivity....

@brunobola , how's it going? And how did you get this feature something very complex ??

I need to implement something like this around here.

@controllernet I'm already using that feature in a production system, it has several changes (overrides) to the cache and other behaviours of serenity (no core changes , only overrides).

When I've got this 100% maybe will give some advice on how to achieve this.
Also the actual company (current active database) is always on the right preferences panel for the user to see.

I've almost done testing it with the several scenarios and even introducing a fast database change using a new select that stays in the preferences tab it works as expected, also I've got to reload the login using the new database selection and it's almost 100% perfect even when it respects per database permissions as expected from a sysadmin point of view.

Will make a separate wiki when I've got it to work, ive got to fix some performance issues because I need some cookies for it to behaviour 100% correct.

Thanks for this @Estrusco,

This is probably a question unrelated to Serenity, but looking at this post I was wondering. How would one add new locations/connection strings at runtime? Would it be as simple as using XmlTextWriter or WebConfigurationManager?

Also looking forward to your wiki @brunobola, great work both of you guys.

Very good! Thank you @brunobola :D

@Estrusco thanks.

Sorry but this is not a correct solution in my opinion. SqlConnections.SetConnection sets the connection string in a static dictionary. Thus, if multiple users are active in different databases at the same time, this would lead to very dangerous errors. This is not thread-safe.

Hmm, probably i looked at solution of @brunobola, not @Estrusco one, will check that too

Ok, @Estrusco solution looks valid, i'm using something similar for a project.

My solution is in a production environment with more than 25 users at the same time and they often work in several databases at same time with no issues, even have more enhancements like preferences with currently opened database and other things.

If you guys don't want it do as you want.
@volkanceylan please don't mislead the users.

I'm not misleading, u know nothing John Snow, it is working %99 doesnt mean it works %100, this is how thread safety works, you should read some

I don't agree with you "john doe", I know you want users to buy you premium stuff, but that's not a right way to be polite and get more people to you.

Have a good year and try to respect more other peoples ideas and probably you'll get more success.

Having said that, your platform is a good entry point for beginners.

Your logic:

if (solutionA is Free and solutionB is Free and JohnDoe suggests solutionB) { console.writeline("i think johndoe wants $"); do { console.writeline("yes i am a genius"); } while (1+1=0) } }

Loool....
My logic is more:

(kindness && help) ?? (console.writeline("respect leaves to profits") : console.writeline("I do must criticate everything because i'm God")....

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stixoffire picture stixoffire  路  3Comments

StefanTheiner picture StefanTheiner  路  3Comments

ahsansolution picture ahsansolution  路  3Comments

stepankurdylo picture stepankurdylo  路  3Comments

moostafaa picture moostafaa  路  3Comments