I have a controller that makes a GET request and returns JSON. I want to then bind those values to the ViewModel that returns to the View.
[HTTPGET]
public async Task<IActionResult> Name(string id) {
ViewModel model = new ViewModel();
var name = await GetNameFromBYId(id);
name = model.Name;//HOW Do I do This?
}
model.Name=name;is the correct syntax