Addin for Visual Studio that generates C# MVC.
- Visual Options for MVC Generation.
- Generates Master Detail views of data models.
- Generates drop down lists for external cross reference tables.
- Generates optional search for fields/drop down lists
- Generates date pickers.
- Generates Strongly Modeled Views
- Great way to start a project or learn MVC.
- Comparable to scaffolding.
Requires ASP.NET MVC3
Install it from
http://www.asp.net/mvc/mvc3
Quick Start:
Start a new C# MVC project.
(File->New Project->Visual C#->ASP.NET MVC 3 Web Application)
Add a Data Model.
Project->Add New Item->Visual C#->Data->ADO.NET Entity Data Model
Run the addin
Right Click your project in Solution Explorer-> :) MVCGenerator
Choose options
Select generation options then click generate.
- The Project that you want to use.
- The Entity Container that you want to use.
- The Entity Type that you want to generate from.
- Generate Button - Clicking will create the MVC Models, Views and Controllers.
- Add a Link on View/Index - Will create a link on the default project Index page for fast testing.
- Check Shared _Layout for JavaScript - Will put the correct JavaScript /css options for MVC.
- Field Name - The name of the field for each generation option.
- Data Type - Just information message to guide in generation options.
- Show In Master View - Whether or not to show this field on the master view.
- Show in Detail View - The mode used to generate this field on the edit view.
- Is Searchable - Allows the field to be searched/Filtered on the Master view.
- Combo Box Column - The Foreign table that the field is linked to.
- Key - The Foreign key field that this column is linked to.
- Display Field - The Foreign field to Display in the Master/View/Edit views.
How to install
Installing the addin in Visual Studio
Get the latest MVCGenerator.dll from the Download Button.
Copy the
MVCGenerator - For Testing.AddIn File to your Addins folder:
C:\Users\YourUserName\Documents\Visual Studio 2010\Addins
or
C:\Users\YourUserName\Documents\Visual Studio 2012\Addins
Download the File here ->
MVCGenerator - For Testing.AddIn <-
Example of the MVCGenerator - For Testing.AddIn File
Edit the .AddIn File and change the <Assembly>Path</Assembly> to the full path to the MVCGenerator.dll
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<Extensibility xmlns="http://schemas.microsoft.com/AutomationExtensibility">
<HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>10.0</Version>
</HostApplication>
<Addin>
<FriendlyName>MVCGenerator - No Name provided.</FriendlyName>
<Description>MVCGenerator - No Description provided.</Description>
<Assembly>
c:\MVCGeneratorInstallFolder\MVCGenerator.dll</Assembly>
<FullClassName>MVCGenerator.Connect</FullClassName>
<LoadBehavior>1</LoadBehavior>
<CommandPreload>0</CommandPreload>
<CommandLineSafe>0</CommandLineSafe>
</Addin>
</Extensibility>
Other Projects
Fast C# or VB Webform Generation
Try my other project:
http://sqltoaspx.codeplex.com