Modify Connectionstring Name for ASP.NET Identity -
i wanted store change connection string points existing database has necessary tables. when searched "defaultconnection" not able find in application, models folder not have of models related classes. see interface definitions metadata. can change connection string value in web.config make work, kind of intriguing know how implemented in case want customize logic, can find classes ?
i using latest version of webapi , using vs 2013.
what confusing me how modify classes implement custom logic, can't find model classes related identity.
you right, web.config place change it. though can implement constructor in applicationdbcontext
calls base [identitydbcontext<tuser>
] class' constructor accepts nameorconnectionstring
. there it's either specify use :base("data source=...;initial catalog=...;...")
or use new overriden constructor.
also, user should (by default) called applicationuser
inherits identityuser
(which dummy class implement iuser
, adds foreign keys claims
, logins
, roles
(among others)). so, if need customize should add custom logic/properties object.
what's important note context , custom (inherited) version of identityuser
within identity library. so, customization you're going "applicationuser
" , "applicationdbcontext"
on up.
Comments
Post a Comment