c# - Extended ASP.NET user not saving into database -


i want make music website /with educational purposes/. wanted use asp.net identity user, wanted add properties. doing code first. made model layer extending identity user this:

public class user : identityuser {     //some data want add goes here      public async task<claimsidentity> generateuseridentityasync(usermanager<user> manager, string authenticationtype)     {         var useridentity = await manager.createidentityasync(this, authenticationtype);         return useridentity;     } } 

so far good. next implemented data layer repository , unit of work patterns , on top of them services layer /mvc project/. ran , registered user , redirected user. though okay decided check database. saw tables, provided asp.net, empty. tried register same user , noticed there user email, already.

i checked connection strings , fine. running out of ideas...

enter image description here

i totally mistaken somewhere, can find it. attach project if wants see code.

source code

so happens yes, being inserted database. however, data table not being refreshed. use solve issue this:

   private void showdata()     {         string constring = @"your;connection;string;"          sqldataadapter sda;         datatable dt;           sqlconnection con = new sqlconnection(constring);         sda = new sqldataadapter("select * yourtablename", con);           dt = new datatable();         sda.fill(dt);         datagridview1.datasource = dt;     } 

then run showdata() on load or on click of refresh button.

i had same issue when designing own application. hope helps.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -