Unable to cast object of type 'System.Data.Entity.Core.Objects.ObjectResult`1[System.Nullable`1[System.Int32]]' to type 'System.IConvertible'.
here is my controller method
int result =Convert.ToInt32(db.AdminLogin( userName, password));
here is my stored procedure code
IF EXISTS(SELECT * FROM [CGP_User] WHERE [UserName] = @UserName AND password=@Password AND ActiveFlag=1)
begin
select 1;
end
Else
begin
select 0;
end