public async Task <UrunListResponse> GetList() { try { var urunler = await urunRepository.GetList(); if (urunler == null) { return(new UrunListResponse("Urun bulunamadı.")); } else { return(new UrunListResponse(urunler)); } } catch (Exception ex) { return(new UrunListResponse($"Urun bulunurken bir hata oluştu.{ex.Message}")); } }
public List <Urun> KdvliFiyataGoreSirala() { return(_repo.GetList().OrderByDescending(x => x.KdvliFiyat).ToList()); }