Linq2db: Sql.T4Model template for fluent mapping

Created on 3 Dec 2017  路  4Comments  路  Source: linq2db/linq2db

Hi,
I did not found T4-template for generation models with fluent pattern for MsSql. Does such exist? if not, can you help to create it

T4 feature

Most helpful comment

As an idea we can generate POCO classes without linq2db attributes and generate xml mapping.

All 4 comments

We do not generate fluent mapping by T4 templates. In real world it may slowdown your first context initialization, especially when there are many entities.
For which purpose do you need that?

ok, but how i can use dto object outside orm-project without Link2Db-references?
Because of the attributes (Forenkey, Column, Table, ect.) it is necessary to add a references to link2db on most project.
In bltoolKit i could use abstract classes in which there was no link with the library, only the declaration properties of the object
Is it possible to use a similar scenario in this product, which makes to use orm without referensing with link2db in all my project (only orm-proj.)?

As an idea we can generate POCO classes without linq2db attributes and generate xml mapping.

I added linq2db fluent mapping generation to the nHibernateMappingTool https://github.com/zdomokos/NHibernateMappingGenerator_Patched. On the Preferences tab select linq2db style. Uncheck "Use Lazy Loading" to not generate virtual properties.

Was this page helpful?
0 / 5 - 0 ratings