Generic Repository

Jan 15, 2015 at 8:07 PM
My application will have 200 tables, If i choose to use this framework, do i need to create service class for each tables ?
Coordinator
Jan 16, 2015 at 12:43 AM
No you can just inject IRepostory and use as is, creating Services is best practice for a business facade. Pick and choose what patterns to adopt that makes the most sense for your project, there are absolutes when it come to architecture, you decide what’s best for your applications/systems.

Jan 16, 2015 at 7:22 AM
Thanks for your reply !!

I have few more questions,
  1. If i use service layer, so i need to inject IRepository and IService for all the tables ?
  2. Can i have single data context for all 200+ tables will it cause any issue(performance/connection) ? or should i need to prefer Multi DataContext ?
Thanks again for your response !!
Coordinator
Feb 12, 2015 at 7:49 PM
  1. Yes
  2. Multi DataContext, the pattern is better known ad Bounded DbContext/DataContext
Marked as answer by lelong37 on 2/12/2015 at 11:49 AM