public IActionResult GetAll() { ServiceResponse <Il> response = new ServiceResponse <Il>(); List <Il> iller = service.GetAll(); if (iller == null) { response.Errors.Add("İller getirilemedi"); response.HasError = true; return(BadRequest(response)); } else { response.entities = iller; response.IsSuccessful = true; return(Ok(response)); } }
public void IlListele() { comIl.DataSource = _ılService.GetAll(); comIl.DisplayMember = "Sehir"; comIl.ValueMember = "IlId"; }