public IActionResult GetGroups([FromBody] GetGroupFiltersModel model) { var gr = _groups.GetGroupInfoBySpeciality(model.SpecialityId); if (gr != null) { return(Ok(gr)); } else { return(BadRequest("Error")); } }
public IActionResult GetDropdownGroups([FromBody] GetGroupFiltersModel model) { var gr = _groups.GetGroupsBySpeciality(model.SpecialityId).Select(t => new DropdownModel { Label = t.Name, Value = t.Id.ToString() }); if (gr != null) { return(Ok(gr)); } else { return(BadRequest("Error")); } }