ASP.NET Core 2.0: How to Pass Data Into a Model Using DI

Imagine you have an ASP.NET Core web page and you would like to edit some data in a form, but you’d like to default that data to something (maybe initially specified in the Web.Config).
I’m sure there are dozens of ways to achieve this, but this is one.

Link: https://dzone.com/articles/aspnet-core-20-passing-data-into-a-model-using-di?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev