asp.net-coredatatableasp.net-core-mvcasp.net-identityphone-number

Problem to show PhoneNumber to Datatable in Asp.Net Core MVC 6 project with Identity


I have a problem with data displaying to datatable.

I'm using the datatable in admin page of my Asp.Net Core MVC 6 project integrated the Identity for user management.

All the data is shown well, but the PhoneNumber column data isn't shown.

I checked it in the data fetching function, but I get the phonenumber correctly.

enter image description here

enter image description here

enter image description here

I hope the solution for this problem.


Solution

  • I solved this problem by deleting the PhoneNumber attribute from the model derived from the IdentityUser. That's because the IdentityUser has the PhoneNumber attribute by default. So we don't have to include it to the customized model design.

    Thanks to @Rena.