You have declared the
GetReg
method as
Business.RegistrationType
- which means it returns a single instance of the class
Business.RegistrationType
.
To simplify it, you would get the same error with this code:
private int Fail()
{
return "Hello world";
}
Because
Fail
is declared as returning a integer, and you are returning a string. You can't implicitly cast a string to an integer - because it might be the text "Hello world" and that doesn't have a numeric equivalent - so the sytem tells you you have made a mistake somewhere.
Your
GetReg
method returns a
List<SelectListItem>
which is a collection of
SelectListItem
objects, and even the individual instances have no obvious relation to the return type!
We can't fix that for you: I have no idea what the heck you expect that to return, and much less idea where it might get that information from!