Huagati DBML/EDMX Tools is an add-in for Visual Studio that adds functionality to the Linq-to-SQL (DBML) diagram designer, and to the ADO.NET Entity Framework (EDMX) designer in Visual Studio 2008 and 2010.
Huagati DBML/EDMX Tools integrates with Visual Studio and adds useful new functionality to the built-in designers for Linq-to-SQL and Entity Framework in Visual Studio. Among the features added to Visual Studio by the add-in are:synchronize your Linq-to-SQL models with the underlying database and any database schema changes,compare and synchronize database, SSDL, and CSDL model in Entity Framework 4 models (VS2010),mass-rename Linq-to-SQL and Entity Framework generated entity classes and their members to use .net naming conventions,generate documentation comments for L2S and EF entity classes from the database,generate SQL-DDL scripts from Linq-to-SQL and Entity Framework models.
Features for ADO.NET Entity Framework
Huagati DBML/EDMX Tools adds a DBML/EDMX Tools dropdown menu to Visual Studio's menu bar
The Model Comparer* for Entity Framework 4 compares the database with the SSDL layer of the model, and the SSDL layer with the CSDL layer. It allows differences to be synchronized across the layers selectively, updating only the portions of the model selected by the user while leaving other portions of the model untouched and intact.
Additionally, the Model Comparer detects and can correct SSDL <=> differences that are caused by changes done in the VS2010 EF designer; changes in data type/maxlength/precision & scale/store generated pattern/default value etc are now a breeze to detect and bring in sync in the other layers.
The Model Comparer for EFv4 shows differences between the database, SSDL, and CSDL layers and allows individual differences to be synchronized or left in place.
The Model Comparer's report view shows database <=> SSDL <=> CSDL differences in report form. Reports can be printed or saved as HTML files.
The Model Comparer allows certain types of differences to be included or excluded in the comparison, and allow database default constraints to be mapped against Entity Framework's StoreGeneratedPattern values.
Standardize ADO.NET Entity Data Model class and member names renames ADO.NET Entity Framework designer diagrams and generated classes:
- Remove/add prefixes/suffixes, e.g. remove leading tbl_, int_, str_
- Use TitleCaseNames for classes and properties if the database names are all lowercase
- Remove underscores_in_names
- Control pluralization/singularization
- Use regular expressions in addition to built-in naming rules
- Plug in custom pluralization / singularization or custom name rule code
The renaming options dialog gives the user control over what naming rules to use when mass-updating class- and property names.
Generate complex types* can generate complex types, grouping commonly occuring entity members together in types reused across all entities sharing the same members.
The Model Comparer allows certain types of differences to be included or excluded in the comparison, and allow database default constraints to be mapped against Entity Framework's StoreGeneratedPattern values.
Update ADO.NET Entity Data Model documentation from database retrieves free-text table and column descriptions, and index definitions from the database and updates the xml documentation fields in the EDMX designer with the descriptions.
SQL Server 2000, 2005 or 2008 (any edition) is required for the update documentation feature.
Cleanup SSDL/MSL/CSDL** detects unmapped entityset/entitytype definitions in the SSDL and CSDL portion of EDMX files and presents a summary of those inconcistencies along with options for removing unmapped entitysets/types and associations/foreign keys linked to them, or to recreate them in the opposite layer of the EDMX file (CSDL / SSDL), and to create new mappings.
The cleanup dialog will list unmapped entitysets/types in the conceptual (CSDL) layer, and storage (SSDL) layer of the EDMX file and has options for removing or re-creating corresponding entity sets/types in the layer where it is missing.
Generate DDL (New Database)** generates SQL-DDL for generating a new database from the SSDL (storage) portion of an EDMX file, including tables, primary keys, foreign keys, and indexes corresponding to foreign keys.
Generate Required/Optional interfaces adds member properties to all entity classes, providing quick and easy access to required (non-nullable) vs optional (nullable) members.
After using the optional/required interface generation add-in feature on an Entity Framework model, all entity classes have new _opt/_req properties providing access to optional and required members respectively.
* = The 'Model Comparer' and 'Complex Type Generator' are available for EFv4 models under Visual Studio 2010. Requires a license issued after 31 December 2009.
** = The 'Cleanup SSDL/MSL/CSDL' and 'Generate DDL' options has been superseded by the Model Comparer under Visual Studio 2010, but are available under both VS2008 and VS2010 for backwards compatibility.
Features for Linq-to-SQL
Huagati DBML/EDMX Tools adds a new DBML/EDMX Tools menu to Visual Studio's menu bar
...and a toolbar providing quick and easy access to the add-in features
Update Linq-to-SQL diagram from database automatically updates Linq-to-SQL designer diagrams
and generated classes with database changes:
- New Tables/Views -> creates new classes
- Dropped Tables/Views -> removes corresponding classes
- New Columns -> adds new properties
- Dropped Columns -> removes corresponding properties
- Columns with changed nullability -> updates member properties accordingly
- Columns with data type changes -> updates member properties accordingly
- New Foreign Keys -> adds associations and navigation properties
- Dropped Foreign Keys -> removes corresponding associations and navigation properties
- Changed Primary Keys -> updates member properties accordingly
- New stored procedures or user defined functions -> adds member methods to the datacontext class
- Dropped stored procedures or user defined functions -> removes member methods from the datacontext class
- Changed signature (parameters or return value/return type) from stored procedures and UDFs -> updates the signature accordingly in the datacontext
Exclusion lists for tables, columns, foreign keys, types/classes, members/properties and associations/navigation
properties allows flexible rules for what to sync and what to not sync.
Customizable rules for auto-generated properties allow columns with default constraints such as NewID,
NewSequentialID, GetDate, or custom default constraints
to be treated as auto-generated.
Compare Linq-to-SQL diagram with database detects changes and differences between
the Linq-to-SQL designer (DBML) and the database and outputs a list of the changes;
- New Tables
- Dropped Tables
- New Columns
- Dropped Columns
- Columns with changed nullability
- Columns with data type changes
- New Foreign Keys
- Dropped Foreign Keys
- Changed Primary Keys
- New stored procedures or user defined functions
- Dropped stored procedures or user defined functions
- Modified stored procedures or user defined functions
The Update/Compare options dialog gives the user control over what kinds of database changes to take into account in the update and compare functions, and customization of many of the update/compare rules.
Standardize Linq-to-SQL class and member names mass updates names of entities and members in Linq-to-SQL designer diagrams and generated classes:
- Remove/add prefixes/suffixes, e.g. remove leading tbl_, int_, str_
- Use TitleCaseNames for classes and properties if the database names are all lowercase
- Remove underscores_in_names
- Control pluralization / singularization
- Use regular expressions in addition to built-in naming rules
- Plug in custom pluralization / singularization or custom name rule code
The renaming options dialog gives the user control over what naming rules to use when mass-updating class- and property names.
Generate SQL-DDL scripts with model <-> db differences compares the Linq-to-SQL model with the underlying database and generates SQL-DDL scripts corresponding to any differences detected; new/dropped tables, new/dropped columns, primary key changes, new/dropped foreign keys/associations.
Update Linq-to-SQL documentation from database retrieves free-text table and column descriptions, and index definitions from the database and updates the xml documentation and description attributes for Linq-to-SQL generated entity classes and member properties with the same information for inline documentation in Visual Studio's code editor.
After using the documentation add-in on a Linq-to-SQL designer, the generated documentation is displayed in tooltips in the Visual Studio code editor.
Generate Required/Optional interfaces adds member properties to all entity classes, providing quick and easy access to required (non-nullable) vs optional (nullable) members.
After using the optional/required interface generation add-in feature on a Linq-to-SQL designer, all entity classes have new _opt/_req properties providing access to optional and required members respectively.
Diagram layout views is a dropdown on the DBML Tools toolbar that allow a Linq-to-SQL model to have more than one diagram layout. New layouts are added using the add view button ().
The DBML Diagram View dropdown makes it easy to switch layout views in the Linq-to-SQL designer.
Supported database platforms: SQL Server 2000, 2005, 2008, 2012 (any edition).