Linq2db: T4, Type (class) name, sheme prefix with underscore

Created on 6 Mar 2019  路  2Comments  路  Source: linq2db/linq2db

Hi, i have problem:

update nuget from 2.2 to the latest.
The type name is generated in a new way for schemes other than "dbo".
Was:

public ITable<AccessContext> AccessContext

Now

public ITable<access_AccessContext> AccessContext

is it possible to set my own Class name?

thank you

T4 question

Most helpful comment

You can disable this feature using

PrefixTableMappingWithSchema  = false;

https://github.com/linq2db/linq2db/tree/master/Source/LinqToDB.Templates#configuring-generation-process

or rename mappings using code similar to properties rename here
https://github.com/linq2db/linq2db/tree/master/Source/LinqToDB.Templates#example-of-generation-process-customization

All 2 comments

You can disable this feature using

PrefixTableMappingWithSchema  = false;

https://github.com/linq2db/linq2db/tree/master/Source/LinqToDB.Templates#configuring-generation-process

or rename mappings using code similar to properties rename here
https://github.com/linq2db/linq2db/tree/master/Source/LinqToDB.Templates#example-of-generation-process-customization

Everything is ok, thank you.

Was this page helpful?
0 / 5 - 0 ratings