如何在数据库中创建角色? [英] How create role to put in the database?

查看:502
本文介绍了如何在数据库中创建角色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望为每个用户创建一个角色,在用户验证(登录)以访问应用程序后,我将给予一些角色并将该角色保存在数据库上。
我将使用数据库aspnet.mdf和Linq toSql来存储数据,但在我需要知道如何创建角色在c#(WPF)和创建后,我希望添加角色在数据库的一个例子,所以这样做为每个用户分配我希望的正确角色。
你有一些想法是怎么回事?
我将使用数据库aspnet.mdf作为示例,因为我看到好的只是为了测试我的应用程序(我需要这个功能来开发一个项目)。




再见



如果您使用的是ASP.NET的成员资格框架,您不需要使用LinqToSql触摸它。您使用ASP.NET的会员资格框架


i wish create a role for each user after that the user authenticate(login) to access to the application i will give some role to and save the role on the database. I will make an example with the database "aspnet.mdf" and Linq toSql to store data but before i need know how create role in c#(WPF) and after created i wish add roles on the database so doing i can assign for each user the right role that i wish . DO you have some idea how do it right??? I will use the database "aspnet.mdf" as example because i see it good just to test my application (i need this feature to develop a project).

Thanks a lot.

Nice Regards,

Bye

解决方案

You don't.

If you're using ASP.NET's membership framework, you don't touch it using LinqToSql. You use ASP.NET's membership framework.

这篇关于如何在数据库中创建角色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆