When inheriting from base Controller class provided by the framework, you can use the convenience method ViewComponent() to return a view component from the action:
public IActionResult GetMyComponent()
{
return ViewComponent("Login", new { param1 = "foo", param2 = 42 });
...