Comments (4)
Yes, this behavior is just in SQL Server. The property TableFieldNotation
on SqlConfiguration
it's for this, but it's a single character, and for SQL i have to switch [ for the beggining and ] for the last position. I'll think in something to make this works.
from identity.dapper.
In my case what I did was I rewrote the Identity.Dapper.SqlServer dll. Because I had to change table names, I had to modify this dll, so I just wrote my own as it is a very small dll. When I did that, I simply changed lines of such as this:
GetUserLoginByLoginProviderAndProviderKeyQuery = "SELECT TOP 1 %USERFILTER% FROM %SCHEMA%.%USERTABLE%, %SCHEMA%.%USERLOGINTABLE% WHERE %SCHEMA%.%USERTABLE%.Id = %SCHEMA%.%USERLOGINTABLE%.UserId AND LoginProvider = %LOGINPROVIDER% AND ProviderKey = %PROVIDERKEY%";
To look like this
GetUserLoginByLoginProviderAndProviderKeyQuery = "SELECT TOP 1 %USERFILTER% FROM %SCHEMA%.[%USERTABLE%], %SCHEMA%.%USERLOGINTABLE% WHERE %SCHEMA%.[%USERTABLE%].Id = %SCHEMA%.%USERLOGINTABLE%.UserId AND LoginProvider = %LOGINPROVIDER% AND ProviderKey = %PROVIDERKEY%";
You could resolve it in such way for your dll too, however, I must admit it would be nice being able to set Table Names outside of your dll in some way. Maybe there is and I missed it?
from identity.dapper.
You can create a class inheriting from SqlServerConfiguration
, or declare a new instance of SqlServerConfiguration
and change RoleTable, UserTable, UserClaimTable, UserRoleTable and UserLoginTable properties values.
from identity.dapper.
Not really a fix, but 34f240c does it for the default tables now. If you want to change your table names on SQL Server, you can do:
.AddDapperIdentityFor(new SqlServerConfiguration
{
RoleTable = "[My Table IdentityRole]",
UserTable = "[User]";
UserClaimTable = "[MyIdentityUserClaim]";
UserRoleTable = "[MyIdentityUserRole]";
UserLoginTable = "[MyIdentityLogin]";
})
from identity.dapper.
Related Issues (20)
- email stored in uppercase at the mysql database HOT 2
- NotSupportedException: Store does not implement IRoleClaimStore<TRole> HOT 12
- Decryption exception HOT 1
- Logo for package HOT 2
- PasswordSignInAsync throws exception HOT 4
- Assign Claims HOT 19
- User Information not updated on FindByLoginAsync HOT 2
- Environment.OSVersion HOT 5
- Claim definition
- How to use string Id for dapper identity user? HOT 2
- using guid response a cast error HOT 3
- Does not connect to the database when I use a remote database (SQL Server) HOT 6
- Dependency injection not working for SqlServerConnectionProvider HOT 4
- Connection Leaks HOT 2
- DapperUserStore is never getting disposed
- MySQL DateTimeOffset HOT 5
- NullReferenceException may be thrown
- Confused about the DapperIdentityCryptography HOT 1
- Implement IQueryable<TUser> Users
- Environment.OSVersion.get is deprecated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from identity.dapper.