public async Task <IActionResult> Projelerim() { ProjeListDto ProjeListDto = new ProjeListDto(); Task <List <Proje> > tProje = _ProjeServis.GetListAsync(i => i.IsiTakipEdenId == _loginHelper.UserHelper.Id && i.Aktif == true); ProjeListDto.Projeler = (await tProje).OrderByDescending(i => i.TarihBas).ToList(); return(View("Index", ProjeListDto)); }
public async Task <IActionResult> Index(int?id) { ProjeListDto ProjeListDto = new ProjeListDto(); Task <List <Proje> > tProje = _ProjeServis.GetListAsync(i => (id == null || i.MusteriId == id) && i.Aktif == true); if (id != null) { ProjeListDto.Musteri = await _MusteriServis.GetByIdAsync(id.Value);; } ProjeListDto.Projeler = (await tProje).OrderByDescending(i => i.TarihBas).ToList(); return(View(ProjeListDto)); }