Hi @Maryan ,
Yes,the first way you could to change the model name in the update method. Now, there are the second way that you could add bind prefix in the method. Just like this:
public IActionResult Update([Bind(Prefix="city")]WeatherModel theWeather, int cityId)
When you used asp-for, it will generate id and name. The name is city.property. And you could bind the name.
Best regards,
Yijing Sun
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.