Search code examples
c#mongodbasp.net-mvc-4membership-providersimplemembership

Implementing Simple Membership & Role Provider with MongoDB


I am in need of creating Simple Membership & Role Provider with MongoDB. I have several questions in my mind. I didn't any walkthrough or any implementation yet for this.

  1. Do I need to create seperate custom membership and role provider classes to implement membrship provider with mongodb?
  2. Do I need to create those 5 membership tables in mongodb?

Any ideas will be appreciated.


Solution

  • 1) Do I need to create seperate custom membership and role provider classes to implement membrship provider with mongodb?

    Yes, that would be one approach.

    2) Do I need to create those 5 membership tables in mongodb?

    There's not really a notion of tables in MongoDB. You are free to design your documents as you like in the custom implementation of the Membership and Roles Providers.

    Whether you need to implement all the methods is another question. That would depend on which functionality of the Membership system you are using, whether you are using all the methods to create, edit, modify users and roles or not.