0
votes

I want to access the User in parameter via HttpContext. Is there a way?

public class User
{
    public string UserName { get; set; }
    public string Password { get; set; }
}

public IActionResult Test(User user)
{
    return Ok();
}
You mean like HttpContext.User? - stuartd
@stuartd, No. What you said is like the Extention Method. - Mohammad Fazeli
@mjwills I use HttpContext where I don't have access to its parameters. And in fact I only have access to HttpContext. I want to access that parameter's Type and Value via HttpContext. - Mohammad Fazeli