T4 Toolbox Linq2Sql

I am trying to use t4toolbox to generate linq2sql classes for a project. There is already a lot of code written against the default code created by dbml.

In the LinqToSqlEntityClassTemplate.tt file it has

/// <para>
/// While MSLinqToSQLGenerator generates field names as property name with an
/// underscore prefix, this method simply converts the property name to camelCase.
/// This is done for consistency with the StyleCop rule SA1306: Variable names
/// must start with a lower-case letter.
/// </para>

Is there a way to make it generate default files (Visual Studio path) instead of camelCasing and not have underscores?

The code generated by t4toolbox causes 400+ errors due to differences in the field name.

+3
source share
1 answer

T4 Linq2Sql, . , T4Toolbox: T4Toolbox/LinqToSql LinqToSqlEntityClassTemplate.tt T4Toolbox . FieldName, .

project view in visual studio

+1

Source: https://habr.com/ru/post/1792827/


All Articles