Entity Framework 4.0 - Code only Reference - entity-framework-4

I am trying to learn EF 4 and its code only features. I tried the following great articles and was able to make a sample application.
http://blogs.taiga.nl/martijn/2009/11/22/entity-framework-4-0-a-fresh-start-with-demo-application/#reply
http://blogs.msdn.com/efdesign/archive/2009/10/12/code-only-further-enhancements.aspx
But I am looking for a good reference library / website on Code only feature. I tried searching MSDN but couldn't find it.
Please help.
Thanks a lot.

There might not be many of them yet. Code only is still in beta-stage and was not released with Visual Studio 2010 RTM. If you plan to use it in a productive environment you should consider using fluent nhibernate or waiting to the final release.

http://blogs.msdn.com/efdesign/archive/2009/06/10/code-only.aspx
http://blogs.msdn.com/efdesign/archive/2009/10/12/code-only-further-enhancements.aspx

Here is a blog article with fully working sample code in ASP.NET MVC 2 in a tutorial form that shows how to use both EF 4.0 Code First and in conjunction with ASP.NET MVC 2. It discusses advanced features of EF 4.0 Code First such as mapping to existing databases and customizing the standard conventions in EF 4 Code First.
The link: http://theminimalistdeveloper.com/how-to-map-to-existing-databases-in-entity-fr

Related

Is there an official page for ASP.NET MVC Futures?

I am planning to integrate Mvc.Futures in my project, but am unable to find any official documentation for this library.
Official project page on nuget.org points to old asp.net project page on codeplex and even there is not so clear where information about Futures can be found.
I might be missing something, but would appreciate if anyone can give me pointers to the right place.
Thanks.
This is follow up on my own question:
I haven't found anything else related to Mvc.Futures after i posted this question, so i ended up using T4MVC which seem to get more love from MSFT than the Futures itself (lead developer of this template is MSFT employee David Ebbo).
We are using it quite successfully so far (more than 8 months) and i am pleased with the results.
For better integration with Visual Studio i am using AutoT4MVC extensions which runs the T4 templates on each change in the sections of the MVC app that require rebuild (such as Controllers, Content*, Views etc..)
To sum up - i would suggest that you stay out of Mvc.Futures for now and use T4MVC instead.

Modular/Plugin Framework In ASP.Net MVC 5

I want to create a web application using ASP.Net MVC5. It is a big enterprise application and having lots of modules, earlier i worked on Siverlight and use the Prism architecture.
I already Google this and found lots of posts but most of them are at least 1 year old so just want to know Is there something new coming introduced which help me to implement the plugin framework.
Hi I was also in search of similar things. I found below helpful.
MVC plug in architecture
MEF in MVC

Code generation for .Net MVC 4.5?

I really hope that this isn't a duplicate post somewhere else on SO but I've searched long and hard and I'm coming up blank.
In PHP if you used a framework like CakePHP you could "bake" your project which would generate the code for your models, views and controllers using your MySQL database ERD (see here http://book.cakephp.org/2.0/en/console-and-shells/code-generation-with-bake.html). This saves tons of time and has become a requirement for me these days.
That said. I can't seem to find any information if a similar function exists either in Visual Studio 2012 or the MVC 4.5 framework. Does anyone know if I can "bake" a .Net MVC 4.5 project from my DB schema?
Thanks in advance for any help.
It is called Scaffolding. You can read a nice tutorial on codeproject: Database First Development with ASP.NET MVC Scaffolding and Entity Framework

does nhibernate.burrow work with mvc.net and dot net 4.0 framework

I am thinking of using nHibernate.Burrow in my mvc.net application. However there are several troubling things that I have read and I am hoping to get them sorted out before I embark on the project:
Are there any issues with running .Burrow with mvc.net?
Are there issues with running .Burrow with the 4.0 framework?
How tightly coupled is .Burrow with the nHibernate? I have read several things indicating that I have to use the same version of nHibernate as was used to create the .Burrow binaries.
Any other thoughts that people have?
Yes, you should use Burrow with appropriate NHibernate version. If you want to use it with another one you can try to put assemblyRedirect in web.config file.
And I wouldn't try to use Burrow with MVC. Yes, it has Session magement and some other usefull featrures, but they are tied to ASP.NET Web Forms.
As a base framework for mvc applications I would suggest Sharp Architecture. It has all required binaries and all versions are latest.

Is there a perfect code generation tool to generate MVC Storefront?

Does anybody know a good code generation tool (other than Subsonic because it doesn't support IQueryable in current version) to generate repository and other projects in a way Rob Conery worked in MVC Storefront?
Rob Conery has put out a Visual Studio plug-in that generates MVC code, using repositories that use IQueryable, although I believe the model is generated using Linq to SQL classes in visual studio, which wasn't the case in MVC Storefront.
You can find it here.
S#arp Architecture may be overkill, but if you haven't checked it out already, I would recommend. It has a very nice tutorial as part of the download as well as a working Northwind sample.
Is T4 the answer for your needs?

Resources