Devildog74 wrote:
just found this link... http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=19582&HighLight=1, revising questions...
using LLBLGen 3.1 the EF4 templates and targeting .NET 4 using options for Proxy friendly POCOs.
Question 1 -> Why would I use a generated ObjectContext vs. a generated DbContext?
We don't support Code first yet, and EF v4.1 is a wrapper around EF v4 with code first, nothing more.
When we generate the code from llblgen end up with an llblgen generated edmx file and a XXXDataContext. The XXXDataContext is a subclass of ObjectContext and the generated object context has accessors for getting ObjectSet<T>.
Now, when I point vs.net at the generated edmx file I can generate a DbContext using the EF4.1 tools.
The generated DbContext gives me access to my entities via DbSet which is a bit different from ObjectSet.
Yes, but there's no real difference. DbContext derives from ObjectContext as well, and is mainly used for code-first and is limited in featureset compared to the generated ObjectContext derived class. I'd use our code over DbContext any day, as you're not using code first (because you're using our designer)
Question 2 -> is there an option to generate DbContext via the llblgen ide that I missed?
Question 3 -> if there is not a option today, when will there be one?
It's not there yet, as we don't support code first yet. it will come in the fall with v3.5
Question 4 -> what are the other llblgen users doing with EF4.1?
You can simply use EF v4.1 with our generated code, you just don't have the DbContext, but you do have the v4.1 runtime which has a couple of performance enhancements you benefit from. The only thing you don't have with our code is code first. As code first is targeted towards creating your model in code, we don't see it as a must-have today, as code first doesn't need a designer anyway. We will support it though, in a scaffolding fashion, similar to fluent NHibernate support: you can generate the mapping definitions + classes or just the mappings.