Post FromBody Always Null
If the model is null, check:
1) Where the data is sent: body, form? and based on that add the decorator to the action. For ex:
[HttpPost]
public JsonResult SaveX([FromBody]MyVM vm) { ... }
2) Check ModelState: if it's invalid the vm will not be bound so it will be null.
if (ModelState.IsValid) { ... }
You get always null
because you need to encapsulate all your post variables inside only one object. Like this:
public class MyPostModel {
public List<string> userSocs {get; set;}
public int collegeId {get; set;}
}
and then
public async Task<IActionResult> GetStudentResults([FromBody] MyPostModel postModel)