let's say I use Entity Framework 6 and have the following two tables in a model-first approach:
This creates following code:
My question is now, how do I use the IEnumeration properties in a Create View? In a Details or Delete View, I just iterate through them using Html.DisplayFor helper, but I don't know what I could use to achieve the comparable for Create and Edit Views. Something like this:
<div class="form-group">
@Html.LabelFor(model => model.MappedEmployees, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
<!--Something like checkbox list with Name property of each collection property item-->
</div>
</div>
So I would end up with something like: