Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlServer DatabaseConnection.CreateTable<> Adds "`1" #15

Open
PARANOlD opened this issue Nov 21, 2018 · 2 comments
Open

SqlServer DatabaseConnection.CreateTable<> Adds "`1" #15

PARANOlD opened this issue Nov 21, 2018 · 2 comments
Milestone

Comments

@PARANOlD
Copy link

A startup.cs run in one of your samples includes a block for generating Identity tables using DataConnection.CreateTable<>. Table names for Identity (and any that are generic types) come out as `1.

I filtered the `1 out in the create process, but it only creates issues later when the ORM tries to access the tables. I also tried filtering them out and then generating a data context to attempt to override the type name interpretation process, but had no luck, the LinqToDB.Identity namespaced objects are still being used to access the database.

SqlException: Invalid object name 'IdentityUserClaim`1'.
LinqToDB.Data.DataConnection.ExecuteReaderAsync(CommandBehavior commandBehavior, CancellationToken cancellationToken) in DataConnection.Async.cs

Would it be possible to change the way LinqToDb interprets type names so that no DB objects will not be created with `1 at the end of them?

@ili
Copy link
Collaborator

ili commented Nov 22, 2018

To fix it you should use Table attribute on your class

@PARANOlD
Copy link
Author

PARANOlD commented Nov 22, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants