Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asp.Net MVC 5 Identity Create Database Admin Interface

I'm working on a new asp.net mvc 5 app for a small company and am trying to figure out how to create the membership database using the new asp.net Identity system. I thought there might be an admin interface I can use which would create the database and allow me to add a few users/roles. Is there an admin interface for this task or another way I will need to accomplish it? Are there any tutorials on doing something like this? All I have been able to find so far has dealt with external logins using other providers such as Facebook or Google.

like image 790
Jon Avatar asked Sep 09 '26 07:09

Jon


2 Answers

I'm pretty sure that it's based off of Entity Framework Code First. When you create the db context, it should create the table for you automatically.

http://msdn.microsoft.com/en-us/data/jj193542.aspx

like image 187
Malevolence Avatar answered Sep 10 '26 21:09

Malevolence


MVC 5 Template with VS2013 use ASP.NET Identity instead of membership provider and has no admin interface. After creating a new MVC5 project in VS2013, run the website. Once you register the first user on the web interface a local database will be created under the App_Data folder. You could rename the connection string to point to other database and register user again to create the database. To add users you could enable migration and use the seed method.

Scott Allen published a great video which might help you to understand ASP.NET Identity more http://pluralsight.com/training/courses/TableOfContents?courseName=aspdotnet-mvc5-fundamentals&highlight=scott-allen_aspdotnet-mvc5-fundamentals-m2-katana*8#aspdotnet-mvc5-fundamentals-m2-katana

like image 28
Diganta Kumar Avatar answered Sep 10 '26 20:09

Diganta Kumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!