我可以在成员资格提供者的表中添加一列以存储用户的头像吗?
问题描述:
我应该在用户表中添加一列以存储用户面部图片吗?
Should I add a column to users table to store user face pictures?
还是应该创建一个新表来保存面部图片?
Or should I create a new table to save face pictures?
答
您不能更改Memebership的表. 如果您添加/编辑/删除其中一个Membership表中的一列,Membership Provider将停止工作.
You cannot alter Memebership's tables. If you add/edit/delete a column of one of those Membership tables, Membership Provider will stop working.
相反,您想要创建自己的表,并将Membership的Users表的UserID用作主键和外键(基本上是一对一的关系).
Instead, you want to create your own table, and make UserID of Membership's Users table as primary key as well as foreign key (which is basically one-to-one relationship).
这里是一个示例-