databinding in asp.net

So I'm just starting using asp.net, I have a card class that has a deck type. (Ex a Bear class would be of "Animal" Deck type)
I am trying to create a card creation view but having issues.
If I push an IEnumerable to the view (
        public async Task<IActionResult> Index()
        {
            return View(await _context.Card.ToListAsync());
        }

) then the syntax for the select statement works
<select>
    @foreach (var item in Model){
        <option item.Name/>
        }
</select>


But then this part doesnt
<div class="form-group">
    <label asp-for="Name" class="control-label"></label>
    <input asp-for="Name" class="form-control" />
    <span asp-validation-for="Name" class="text-danger"></span>
</div>


But if i dont make @model an IEnumerable then the opposite happens. Whats my best route here?
Was this page helpful?