0

I am creating a system which will have multiple customer. right now i am using same database and table for all customer but i think it'll slow down fetching of record when i'll have hundreds of customer's data in same database. so should i create separate database for each new registered customer dynamically by executing scripts from code? (will use master database to manage all user's connectionstrings)

I'm using entity framework. so same will be possible using EF? will it cause any problem?

3
  • this is a very general topic Commented Jul 7, 2017 at 5:57
  • 3
    Possible duplicate of Multiple Databases Vs Single Database with logically partitioned data Commented Jul 7, 2017 at 5:57
  • Your question is essentially can EF support multiple DB per app? to which the answer is yes Commented Jul 7, 2017 at 6:26

1 Answer 1

0

May be you can use ABP framework to handle multiple database with entity framework. ABP will help you to auto register repositories into IocContainer by adding attribute of all your DBContext (Each DBContext connect to a DB) as following:

[AutoRepositoryTypes(
typeof(IRepository<>),
typeof(IRepository<,>),
typeof(SimpleTaskSystemEfRepositoryBase<>),
typeof(SimpleTaskSystemEfRepositoryBase<,>)
)]
public class SimpleTaskSystemDbContext : AbpDbContext
{
     ...
} 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.