This project is read-only.

ObjectContext creation

Aug 15, 2008 at 8:37 PM
My original post was meant to ask why don't you extend the data broker to support Linq, but I saw that since IDataStoreBroker is an interface doing something like an extension is utterly stupid :D.

So my question is: Why do I have to create the ObjectContext from the configuration file ? I'd rather do it manually. It's just something that's stuck in my head right now since I wanted to try it this way (that's without the config ). The config isn't that big of a deal but it would be nice to have access to different constructors for instance if you'd want to use StructuredMap as a Dependency Injection. Maybe creating a config interface would be nice so that the default creation would be done through the config file but alternative methods that don't require the .config to be present could still work.

These are just thoughts but it would be nice to see what you think of it:P.

Aug 19, 2008 at 11:37 PM

Thank you very much for your time. LINQ support is in the works (basic SELECT and WHERE queries work) so there is a lot of room for improvements there. Right now I'm working in GROUP BY support for Criterias.
The ObjectContext class was designed as a "high level" API and therefore is cleaner, easier to use but less flexible. For hardcore people Retina.NET provides the "low level" API conformed by a combination of a DataStore & Broker objects.
Having said that, I don't see as a bad thing to expose a way to configure an ObjectContext instance by other means, and it would add some additional flexibility to the high level API currently existing. Let's talk a little more about some possible implementation details.