You can't convert a string to a
Controller
instance.
Depending on your setup, you
might be able to create an instance of the controller to pass in:
AlbumController controller = new() { ControllerContext = ControllerContext };
string html = Helper.RenderRazorViewToString(controller, "Index", context.Songs.ToList());
Or perhaps you could resolve the controller instance from your DI container:
AlbumController controller = HttpContext.RequestServices.GetRequiredService<AlbumController>();
string html = Helper.RenderRazorViewToString(controller, "Index", context.Songs.ToList());
Otherwise, you may need to specify the full path of the view:
string html = Helper.RenderRazorViewToString(this, "~/Views/Album/Index.cshtml", context.Songs.ToList());