Cannot get "Generate Database from Model" using "Migration T-SQL" approach in VS2012/EF5. Is this a bug??? Works fine in VS2010 - entity-framework

I have got a tricky problem with VS2012 and EF5. I have posted the full details on the MSDN forum, see: http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/c63bf034-f205-4b4e-82e0-40b1c3fca71d.
However it seems that the EF team are now recommending we also post on here as well, so I am.
Many thanks.

If this is the EF Designer Power Pack then it is not supported. See this for more details:
http://entityframework.codeplex.com/workitem/499

Related

Entity Framework 6, Postgres (npgsql) and EF Power Tools

I have some trouble using the EF Power Tools and I searched now for several days but I didn't find any solution for my problem.
Maybe someone has a new idea or hint for me. My problem is that when I want to create a Preview Data Model VS says that it couldn't find the required ADO.NET driver. I'm working with Postgres and EF 6.
It worked several days before but, as far as I can see within my source control nothing important changed. So I started to search for a solution and tried several things. I guess it has something to do with my app.config but I have no idea what I'm exactly missing there.
The app it self runs great and also the connection to the db works fine, only the EF power tools seems to have a problem.
It would be great if anyone could help me.
Regards Alex

Data sources toolbox for VS2012 does not display my entity model

After adding an entity model either from the datasources toolbox itself or by adding it => "add" => "new item" it does not show up in the datasources toolbox and therefor i dont get that easy drop and drag functionality.
If I add a dataset it works but that is an older technology (is it not?) everything in my current project are entity models and to change to datasets (which only works if I add xmlns:yourAlias="clr-namespace:WpfApplication3") would be .. I don't think best practice and a waste of time.
I have recreated this same process of adding a entity model in VS 2010 and it works 100%, where i have the ability to simply drop and drag from the dataSource toolbox
Maybe ill just wait for VS SP1 before working with it for client projects. :(
//Edit
If I add the ADO.net Entity model in VS2010 and then load the project in 2012 it loads fine in the dataSource toolbox. This is an answer but not an ideal work around.
While working on a project I recently faced the same problem. It took me about two days of extensive research but I think I've finally found it:
http://msdn.microsoft.com/en-us/data/jj556581
At least for me it solved the problem. Please let me know if it helped you..
Being addicted to L2S, I tried to get familiar with VS2012 and EF5. But I nearly lost my nerves trying to use the data sources toolbox.
Finally I found a solution:
using Object Data Source is now the recommended approach for using EF in databinding scenarios. See this article for more details - http://msdn.microsoft.com/en-us/data/jj574514. The article also includes a link to revert to the old code generation if that is what you desire.

EF 5.0 Code first EF Tracing with DBContext

I've a project using code first approach and EntityFramework 5.0 and im willing to add tracing but haven't gone far, i've read this link but im unable to make it work using DbContext approach. Original EF Tracing/Caching was written using ObjectContext and after reading thru lots of pages i still can't figure out how to make it work properly. In the link provided above, i'm getting an error not finding NorthwindContext.
Can someone provide some insight on where and how to compile a working solution using EFTracing with DBContext? A code Sample would be a huge help.
Thanks,
Ricardo
There are some hoops you need to jump through. I blogged about this here: http://blog.3d-logic.com/2012/03/31/using-tracing-and-caching-provider-wrappers-with-codefirst/. Hopefully it will help you resolve your problem.
EDIT
EF6 now contains a built-in mechanism for logging/tracing. From more details see the feature specification and this blog post.

How to get Npgsql working with EF4?

hey I know it's an old question but I'm a little stuck trying to even get Npgsql to work with EF4 at all! I can't seem to register the provider wherever it needs to go in order for it to show up in the the Entity Data Model Wizard.
When trying to create a new model, I try and create the connection to the Postgres database in the "Change Data Source" dialog. But the only providers in here are differing flavours of MSSQL and "". The data provider combo on this form doesn't show Npgsql or anything postgres related.
I have already done the usual of registering npgsql and the mono security assemblies in the GAC. I've modified machine.config (32 and 64bit) to have the provider factory entry required.
I'm using VS2010 SP1 on Windows 7 64bit & Npgsql 2.0.11.92. I'm developing for .NET4.
Any ideas of how to get this working would be much appreciated.
Unfortunately Npgsql doesn't have support for VS Wizards.
We have a very early work in progress which you can give a try.
Checkout our downloads page and look for the Npgsql.Provider.zip file.
Follow the install instructions there and let me know if it works ok for you.
Again, sorry for the lack of support.
I hope it helps.

Is EF4 "Code Only" ready for production use?

I've been looking at the new Entity Framework 4 Code Only features, and I really like them. But I'm having a hard time finding good resource on the feature. Everything seems to be spread around blongs here and there, so this make me wonder if it's ready to be used for a serious project?
What do you think? Is it ready for production use or should I use the more traditional approach (EDMX designer, POCO objects)?
Also, I would like to know if there are any features that Code Only does not support yet, compared to the EDMX designer?
What do you think about the Code Only feature? Is it "mature" yet?
Thank you.
It depends when your project should be ready. Code First (Code Only) is only in CTP3 without go-live license. As I've read, there is no exact timeframe for the Feature Pack Where is EntityConfiguration in EF4 VS 2010 RTM? and it will be published when it will be ready (no release date). According to the blog of EF team it will be available in the next framework release.
Code First is still under active
development and will have some
breaking changes so there is no
go-live licence at this time.
Link
Code First = Code Only
In my projects I went with EF + POCO for now.
If anyone is still looking for an answer to this, Entity Framework V4.1 which has the "Code first" feature has been RTW (released to web) for production use since a month and a half now.
You need .Net 4.0 RTM in order to install it. Once you have that installed, you can download the stand-alone installer for EF4.1 from here.