Java EE to C# Rest server

I've got a simple Java EE project wich I have to conver to C# rest with same client side code. In Java I used jax-ws REST API and want to try do the same in C#, but there is some problems, when I do POST method to C# with dto class body - each field of this dto is null.

Code in Java:

@POST
@Path("/login")
public Response login(LoginData loginData) {
    if (loginData == null) {
        return Response.noContent().build();
    }
    return Response.ok().build();
}

and Code in C#:

[HttpPost]
[Route("login")]
public HttpWebResponse UserLogin([FromBody] LoginData loginData)
{
    if(loginData == null)
    {
        return null;
    }
    return null;
}

Also I can't find the equivalent class for Java Response in C#.