asp.net mvc - MVC5 Login to custom Database -
what if have own database , bal (business access layer) , don't want use defaultconnection
, template aspnet database tables own user tables?
how can use custom database?
connectionstring:
public class appdbcontext : identitydbcontext<appuser> { public appdbcontext() : base("defaultconnection") { } }
web.config
<add name="defaultconnection" connectionstring="data source=(localdb)\v11.0; attachdbfilename=|datadirectory|\nakedidentity-mvc.mdf; initial catalog=nakedidentity-mvc;integrated security=true" providername="system.data.sqlclient" />
you can customize tables, storage , classes.
process not straightforward little bit of work can that. i've answered similar question few days ago.
can find here.
you can find project on github i've tried customize tables involved in authentication/authorization process.
this answer can read more using different storage users , roles.
Comments
Post a Comment