Creating users with different roles using .Net Identity 2.0 within Entity Framework
Well, you say that both Student and Teacher inherit from the base class Person. Considering that, and the fact that you never actually use either the Student or Teacher specifically in this code, why bother checking the Role at all? Your UserManager&lt;IdentityUser&gt; is taking in a person, not a Teacher or a Student.

Now, if I would happen to be wrong about that, I would suggest looking into the Factory Pattern. You could create a factory that takes in all of the fields from your GUI as arguments, and decides which type of Person to create based on the arguments it's recieved. It won't do away with all of the if...else if logic, but it will abstract it away and hide it from your GUI and make your code more testable.