What's new roundup for EntityFramework Reverse POCO Code First Generator
Whats in the next version:
Ability to add WCF(DataMember, DataContract attributes) support on Entity. Requested by spatemp
- Fixed bug if default constraint was not in expected format. Thanks to Filipe Fujiy.
- Fixed issue when running 'Transform All T4 Templates' from Visual Studio Build Menu. Thanks to JRoselle.
- Changing mappings during runtime is not possible/expensive. A specific DbModelBuilder can be used for each needed database schema. Thanks to meixger.
- Added ability to detect and use .IsRowVersion().
- Added many-to-many mappings. The generated code now includes calls to .Map(). Therefore the generated code will be different to what you had previously in v1 if you have many-to-many table mappings in your database. Hence the revision change to v2.0.0 as I'm using semantic versioning.
- VARBINARY(MAX) is now correctly assigned to byte[]. Thanks to Luke91577.
- Extending partial class support. Allow specification of file extension for partial classes (i.e. ".generated.cs"). Thanks to AB_dreeve.
- Fixes issues when targeting .NET 4. .NET 4.0 doesn't include the System.ComponentModel.DataAnnotations.Schema namespace, allow specification of TargetFrameworkVersion. Thanks to AB_dreeve.
- Including views is now working. For a view to be included, at least one column must not be nullable. Thanks to Delmo Carruzzo.
- Added selective generation of components (Poco, Context, UnitOfWork, PocoConfiguration). You can now build entities in your Model project, and context, configuration, unit of work in your Data project. Thanks to kscelfo.
- Added PrependSchemaName flag. You can now control if the schema name is prepended to the table name. Thanks to kscelfo.
- Added UseCamelCase flag to the tt file. You can now control if you want your table and column names CamelCase or left alone: i.e. FieldPersonOrder or field_person_order
- Removed the Linq de-duplication code as it is now being done in SQL. The Linq version did not include the schema name when de-duplicating FK's.
- Added DISTICT to the foreign key SQL. This prevents duplicates from appearing.
They can appear with SQL such as:ALTER TABLE [Mars].[Table2] WITH CHECK ADD CONSTRAINT [FK_Table2_Table1] FOREIGN KEY([Table1Id]) REFERENCES [Mars].[Table1] ([Id]) ALTER TABLE [Mars].[Table2] CHECK CONSTRAINT [FK_Table2_Table1]
- It now has the ability to read connection strings from other config files/projects.
It starts by looking at the local project for the named connection string in the following files:- app.config
- web.config
- app.config.transform
- web.config.transform
- or edit the above list in the .tt and specify which file(s) to use
- Can now optionally generate separate files. See the new boolean flag GenerateSeparateFiles.
- Removed the hard coded 300 second timeout. The timeout can be specified in the connection string.
- Add support for DateTime2
- Add support for UnitOfWork and the repository pattern. This means you can now unit test your repositories. See the source code for examples.
- Add IDisposable to db context.
- Add .HasPrecision(precision, scale) for fields that have scale. Thanks to @choudeshell
- Enhance ReadSchema performance with early table exclusion.
- Now supports columns with symbols and punctuation.
- Handles decimal default values.
- A bugfix for WCF. See issue https://efreversepoco.codeplex.com/workitem/4
Ability to add WCF(DataMember, DataContract attributes) support on Entity. Requested by spatemp