First of all, I have struggling with this idea
I am trying to make a silverlight code first model with unity and sql then use mvvm
I would prefer to use my connection string inside my database context class
Is this the best way to handle this?
The problem with this approach is I do not seem alot of examples http://dotnetspeak.com/index.php/2011/03/repository-pattern-with-entity-framework/
here is a example of using wcf ria code first
Is this the best way to handle This?
I was scan those tutorial and I agree with Generic Repository and implement IDisposable but I am not agree with place Connecttion string inside DbContext then return new instance every time(In case DI APP).
If you follow the links below you will find how to retrive connectionstring in code.
Protecting Connection Information (ADO.NET) on MSDN:
Finally, Code first have not use with product.
String for EF 4.1