Reputation: 89
Using web api 2 and have authentication set up and what not. But I'm really not a fan of the Guid for user id. I will prefer an auto increment int id. Is it possible to change it implementing my own IdentityUser? How will I start?
Upvotes: 0
Views: 280
Reputation: 13380
If you want int ids, you need to create your own implementation of IUser
and IUserStore for your custom IUser class
public interface IUser
{
string Id { get; }
string UserName { get; set; }
}
public interface IUserStore<TUser> : IDisposable where TUser : IUser
{
Task CreateAsync(TUser user);
Task DeleteAsync(TUser user);
Task<TUser> FindByIdAsync(string userId);
Task<TUser> FindByNameAsync(string userName);
Task UpdateAsync(TUser user);
}
Upvotes: 1