Exception has been thrown by the target of an invocation in asp.net core and postgresql migration

I am trying to create a project. That’s why I downloaded a startup template from this link. Then I tried to configure with asp.net core. I set the connection string as "Default": "User ID=postgres;Password=**********;Host=localhost;Port=5432;Database=LibraryManagementDb;Pooling=true;". and then changed UseSqlServer to UseNpgsql in LibraryManagementDbContextConfigurer class.

Problem receiving form data in the controller. C# – MVC

Friends, I have 3 tables. Person, Student and Address. Person is a general table, has the fields of name, email, phone, etc. And I have an address table to save the student’s address. I’m having trouble bringing the information from the address fields dynamically and finalizing a new student registration.I appreciate if anyone can analyze.