Unless
User.Identity.Name
always contains only the digits 0 to 9, and has a total value that will fit in an Int32, then
Convert.ToInt32
will always fail.
Given that it's called
Name
the chances are that it isn't a number. I'd start by looking at what it should contain, and check if what you actually meant was something like:
changemodel.AdminId = Convert.ToInt32(User.Identity.Id);
Or more likely:
changemodel.AdminId = User.Identity.Id;
But if you do have to convert it then use TryParse:
if (!int.TryParse(User.Identity.Id, out changemodel.AdminId))
{
...
}
else
{
...