Is there any tooling or support in Visual Studio 2010 for manually creating Entity Framework models?
I'm finding the designer too restrictive in terms of mapping a reasonable complex conceptual model to an efficient and performant storage model and understand that part of this may be due to not all features being supported by the edmx designer in visual studio but have yet to find any support for working with it manually - if anything the lack of xml view on the edmx makes it harder.
I'm also open to suggestions for other ORMs I can look at to replace Entity Framework for use in ASP.NET MVC projects my main requirement being that it be quick and easy to configure.
You might be a good candidate for Code First Entity Framework, it's in CTP5 currently but worth checking out.
Here's a blog post from Scott Guthrie introducing EF Code First.
Related
I'm wondering if Visual Studio 2013 has any way to scaffold views using the controllers in MVC. I want to use a repository pattern, so for now I created that myself, and I would like to generate the views.
In Visual Studio 2012 I used the technique explained here by Scott Hanselman, but with the new scaffolding introduced in the new version of Visual Studio I was wondering if this is not supported natively
The scaffolding functionality appears to be embedded in Common7\IDE\Extensions\Microsoft\Web\Mvc\Scaffolding\Microsoft.AspNet.Scaffolding.Mvc.5.0.dll and I can't find any way to customize it further. So if there isn't a built-in means of scaffolding the way their used to be, it looks like you're doing to have to roll your own mechanism.
If it possible to use table valued functions in an EDMX with Entity Framework 5 RC / Visual Studio 2010?
I cannot see the option in the EDMX designer, I have a feeling that the designer is in .net 4.5? Are my suspicions correct? Or perhaps in Visual Studio 11?
I'm not really in a position to be able to upgrade our project to .net 4.5 yet, is there another way of using table valued functions (perhaps modifying the edmx by hand?).
ADDITIONAL INFO:
This blog post on msdn helps confirm the incompatibility:
Some features are only available when writing an application that
targets .NET 4.5. This includes enum support, spatial data types,
table-valued functions and the performance improvements. If you are
targeting .NET 4.0 you still get all the bug fixes and other minor
improvements.
However interestingly, this tutorial discuses modifying the EDMX directly to add support for TVF, but it appears to be for a an old beta. The XML intellisense also didn't find the elements discussed in the tutorial, but it might be because it was using a different schema. Unfortunately I've run out of time to try and apply the tutorial to the new EF5 Release candidate, but I'd be interested in knowing if anyone has had any luck.
Unfortunately table valued function support is currently dependent on .NET 4.5 and VS 2012.
I have been using this approach in order to use table-valued functions from EF 4. Basically it includes hand-editing the EDMX file. The downside to that approach is that you need to edit the file manually whenever you update your model.
Is there any good free scaffolding tool for Visual Studio 2010 MVC 3 project? I am looking for ability of generation code for entities, DAO, services and (it will be great) fluent NHibernate mappings and other.
It's an obvious answer, but have you seen the MVC Scaffolding stuff that Steve Sanderson has put together -
http://blog.stevensanderson.com/category/scaffolding/
We have a set of VS 2008 packages which leverages custom Project/Item templates, designers around XML files for our in house product development using VS. We are planning to move to VS 2010 and looking for migrating our VS 2008 packages to 2010. I see that there has been a rewrite of VS from ground up using WPF/MEF, but still could not figure out how we can leverage it for our packages. I am seeing some guidelines, samples and community material on how we should be extending the VS 2010 WPF based text editor, but could not find any reference implementations on how one should implement a custom designer on top of XML using the WPF/MEF APIs of VS SDK.
Only sample I have come across regards to any custom designer implementation so far was Example.XmlWpfDesigner - http://code.msdn.microsoft.com/Designer-View-Over-XML-20a81f17 which does not talk anything about WPF/MEF way of doing custom designers.
Has anybody come across any reference implementations along these lines? Any help regarding this would be much appreciated.
Thanks,
Siva
The sample you linked to is the right one to be looking at for a designer over an XML file. It is a WPF-design surface that edits VSTemplate XML files.
The only part of the VS API's that moved to MEF in VS 2010 was the core text editor. While you are welcome to use MEF for the implementation details of your designer, you'll still need to talk to the VS COM API's to do things like buffer management, interfacing with Source Control interfaces, etc...
I really like the feature of having a dependency diagram and preventing certain assemblies from having references to other assemblies - ensuring other developers adhere to good programming practices.
Is there an open source equivolent of Visual Studio 2010 Ultimates Dependency Diagram? I checked out NDepend, however, this is for business use, so I cannot use the free version.
Edit: Perhaps I'm referring to the layer diagram? Whatever diagram that can be used to ensure certain assemblies do not have references to other assemblies
I.E.
Business assembly
Data assembly
Data.EntityFramework assembly
Data.EntityFramework implements interfaces from the Data assembly. The Business assembly only has a reference to the Data assembly, and has an instance from Data.EntityFramework via Unity or another IoC container.
I only have Visual Studio 2010 Professional :(
I haven't found anything that is a full equivalent of the layer diagrams in VS 2010.
ConQAT will let you visualize and analyze architectural conformance, but won't enforce rules at compile time like layer diagrams can. Also, ConQAT doesn't seem to work with VS 2010 solutions, which is a shame because it looks like it could be a very useful tool. It does support VS 2008 solutions.
Gendarme is the closest match to what you want, I think. This is a rule-based tool from the Mono team, and can be integrated into the IDE or your build server. So it will help you identify and enforce good programming practices, but it's not going to generate any diagrams for you.
Out of the box, Gendarme comes with lots of rules for catching bad practices (long methods, lack of cohesion, deep inheritance trees, etc.). You would have to write your own custom rules to enforce your specific architectural constraints - in your case by iterating through the assemblies and checking references.
The rules are written in C# - here's an example.