SimpleMembership with custom database schema in ASP.NET MVC 4

前端 未结 7 935
闹比i
闹比i 2020-12-04 21:50

I want to enable the ASP.NET MVC 4\'s SimpleMembership API to integrate with my own database schema. I have a plain and simple table in my database called Users

7条回答
  •  有刺的猬
    2020-12-04 22:38

    This may not work for your use-case but of course you can very easily add your user attributes to the Simplemembership UserProfile Table instead of creating another User Table

    I would recommend using the existing membership table to keep hashed password, and just ignore the fields that you don't need. That way maintains compatibility with SimpleMembership without much fuss.

    SQLMembership is very easy out of the box. I've done extensive customized extensions to SQLMembership on a couple of projects, which wasn't that difficult - but looking back, I wish I hadn't. It is kind of a maintenance hassle,

提交回复
热议问题