How to use of Multiple DbContext with SharpRepository

58 views
Skip to first unread message

Hamza Mayet

unread,
Feb 11, 2015, 12:31:04 PM2/11/15
to sharpre...@googlegroups.com

​Hi Jeff

​i have a situation here i want to use multiple DbContext in my application so how can i configure sharprepository for that.
Can you guide me​.




Regards,
Hamza Mayet





Jeff Treuting

unread,
Feb 11, 2015, 12:39:12 PM2/11/15
to Hamza Mayet, sharpre...@googlegroups.com

You could always new up a specific implementation of EfRepository yourself and pass in the DbContext that you want to use, or create some sort of factory that does that for you.


But are you asking how to do it while doing dependency injection of IRepository and the config files to control what type of implementation gets passed in and specifically what DbContext gets loaded into each?


Jeff


From: sharpre...@googlegroups.com <sharpre...@googlegroups.com> on behalf of Hamza Mayet <hamza...@gmail.com>
Sent: Wednesday, February 11, 2015 9:31 AM
To: sharpre...@googlegroups.com
Subject: [SharpRepository] How to use of Multiple DbContext with SharpRepository
 
--
You received this message because you are subscribed to the Google Groups "SharpRepository" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sharpreposito...@googlegroups.com.
To post to this group, send email to sharpre...@googlegroups.com.
Visit this group at http://groups.google.com/group/sharprepository.
To view this discussion on the web visit https://groups.google.com/d/msgid/sharprepository/CAOTXoTcwmHt0M-90W_Z_gmTs%2BTLRenjXL2%3DMTc0R1ndjzj1p%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hamza Mayet

unread,
Feb 11, 2015, 12:46:56 PM2/11/15
to Jeff Treuting, sharpre...@googlegroups.com

Yes jeff thankyou for writing me spontaneously..  If you just show me some hint to do it. 

Hamza

Reply all
Reply to author
Forward
0 new messages