Your example data does not match the model or explain what is submitting the data. I'll assume a View posting an HTML form. The element names in the form must be indexed so the model binder can populate the list. https://www.learnrazorpages.com/razor-pages/model-binding
public class SystemReviewController : Controller
{
public IActionResult Index()
{
List<tbl_Log_ReviewOfSystems> list = PopulateList();
return View(list);
}
[HttpPost]
public IActionResult InsertReviewOfSystems(List<tbl_Log_ReviewOfSystems> model)
{
return Ok(model);
}
private List<tbl_Log_ReviewOfSystems> PopulateList()
{
return new List<tbl_Log_ReviewOfSystems>() {
new tbl_Log_ReviewOfSystems()
{
ClientID = 1,
VisitID= 9999999,
MRNumber= 5396,
QuestionID= 8112,
CategoryCode= 1,
Category= "General",
EnglishDescription= "BMI",
QuestionResponse= "None",
DateEntered= DateTime.Now,
},
new tbl_Log_ReviewOfSystems()
{
ClientID = 1,
VisitID= 9999999,
MRNumber= 5396,
QuestionID= 2092,
CategoryCode= 1,
Category= "General",
EnglishDescription= "BODYACHES",
QuestionResponse= "None",
DateEntered= DateTime.Now,
}
};
}
}
@model List<MvcDemo.Models.tbl_Log_ReviewOfSystems>
@{
ViewData["Title"] = "Index";
}
<h1>Index</h1>
<form method="post" action="/SystemReview/InsertReviewOfSystems">
<table class="table">
<thead>
<tr>
<th>
@Html.LabelFor(model => Model[0].ClientID)
</th>
<th>
@Html.LabelFor(model => Model[0].VisitID)
</th>
<th>
@Html.LabelFor(model => Model[0].MRNumber)
</th>
<th>
@Html.LabelFor(model => Model[0].QuestionID)
</th>
<th>
@Html.LabelFor(model => Model[0].CategoryCode)
</th>
<th>
@Html.LabelFor(model => Model[0].Category)
</th>
<th>
@Html.LabelFor(model => Model[0].EnglishDescription)
</th>
<th>
@Html.LabelFor(model => Model[0].QuestionResponse)
</th>
<th>
@Html.LabelFor(model => Model[0].DateEntered)
</th>
<th></th>
</tr>
</thead>
<tbody>
@for (var i = 0; i < Model.Count; i++)
{
<tr>
<td>
@Html.TextBoxFor(modelItem => Model[i].ClientID)
</td>
<td>
@Html.TextBoxFor(modelItem => Model[i].VisitID)
</td>
<td>
@Html.TextBoxFor(modelItem => Model[i].MRNumber)
</td>
<td>
@Html.TextBoxFor(modelItem => Model[i].QuestionID)
</td>
<td>
@Html.TextBoxFor(modelItem => Model[i].CategoryCode)
</td>
<td>
@Html.TextBoxFor(modelItem => Model[i].Category)
</td>
<td>
@Html.TextBoxFor(modelItem => Model[i].EnglishDescription)
</td>
<td>
@Html.TextBoxFor(modelItem => Model[i].QuestionResponse)
</td>
<td>
@Html.DisplayFor(modelItem => Model[i].DateEntered)
</td>
</tr>
}
</tbody>
</table>
<div>
<input type="submit" value="submit" />
</div>
</form>