In MVC 6, a property Includeno longer has a setter. You need to pass a list of related properties using the constructor:
public BindAttribute(params string[] include)
{
Include = include;
}
And in your case:
public IActionResult Create([Bind("Imie","Nazwisko","Wiek")] Pracownik pracownik)
source
share