I have this query to get the data inserted in my db
var groups = (from group_s in _context.Groups
select new SelectListItem()
{
Text = group_s.GroupName,
Value = group_s.GroupId.ToString(),
}).ToList();
ViewBag.Groups = groups;
and this my html select tag
<select class="select2 form-control"
asp-for="@Model.Group"
asp-items="@(new SelectList(ViewBag.Groups,"Value", "Text"))"
multiple>
</select>
my problem is how to get the items selected in my form, please someone have any idea ?