开发者

Forms Authentication: How to change the Username using LINq

开发者 https://www.devze.com 2023-02-25 10:47 出处:网络
I have a system whereby an administrator enters in the IT credentials for users who use the system. Included in this is the Username for that person.

I have a system whereby an administrator enters in the IT credentials for users who use the system. Included in this is the Username for that person. However if she makes a mistake, I am not sure how she can correct it. I am using Forms Authentication, MVC and Entity Framework 4.0. I am using the aspnetdb database supplied by Microsoft with the User credentials.

One possible solution is to delete and then create the user with the new user开发者_运维百科name. But the problem then is that I lose the password.

Should I create a model of the database in EF so I can modify the database, or should I try something else like stored procedures?


I think the easiest will be to create a stored procedure that will update just the UserName field in aspnet_Users table

0

精彩评论

暂无评论...
验证码 换一张
取 消