public IActionResult Active() { var aktifKayıt = service.GetAll(x => x.isActive == true).Data; if (aktifKayıt.Count != 0) { return(Ok(aktifKayıt)); } return(NotFound("Aktif kayıt bulunamadı.")); }
public IActionResult Create() { ViewModel mymodel = new ViewModel(); mymodel.Forms = formService.GetAll().Data; mymodel.FormElements = formElementService.GetAll().Data; return(View(mymodel)); }
public IActionResult Index() { if (HttpContext.Session.GetString("Name") == null) { return(RedirectToAction("Login", "Admin")); } ViewModel mymodel = new ViewModel(); mymodel.Forms = formService.GetAll().Data; mymodel.FormElementItems = itemService.GetAll().Data; mymodel.FormElements = formElementService.GetAll().Data; mymodel.FormArchives = formArchiveService.GetAll().Data; return(View(mymodel)); }