Ejemplo n.º 1
0
 public async Task <SayilarDto> Sayilar(int firmaid)
 {
     return(new SayilarDto
     {
         AracSayisi = await _aracRepository.All(firmaid).CountAsync(),
         BakimTalebi = await _bakimTalebiRepository.All(firmaid).CountAsync(),
         KullaniciSayisi = await _kullaniciRepository.All(firmaid).CountAsync(),
         MusteriSayisi = await _musteriRepository.All(firmaid).CountAsync(),
     });
 }
Ejemplo n.º 2
0
 public async Task <DataGridDto <BakimTalebiListDto> > List(int firmaid)
 {
     return(await GenerateDataGridDto <BakimTalebiListDto> .Store((from a in _bakimTalebiRepository.All().Where(w => w.FirmaId == firmaid)
                                                                   join arac in _aracRepository.All() on a.AracId equals arac.Id
                                                                   join marka in _lookupListRepository.All() on arac.MarkaId equals marka.Id into markad
                                                                   from marka in markad.DefaultIfEmpty()
                                                                   join kullanici in _kullaniciRepository.All() on a.KullaniciId equals kullanici.Id
                                                                   join d in _lookupListRepository.All() on a.DurumId equals d.Id
                                                                   select new BakimTalebiListDto
     {
         Id = a.Id,
         Marka = marka.Isim,
         Model = arac.Model,
         Plaka = arac.Plaka,
         Tarih = a.BakimTarihi,
         Telefon = kullanici.Telefon,
         AdSoyad = kullanici.AdSoyad,
         EnSonBakimYetkiliServis = arac.EnSonBakimYetkiliServis,
         Durum = d.Isim
     }
                                                                   )));
 }