コード例 #1
0
ファイル: PatientController.cs プロジェクト: sito92/Klinika
        public ActionResult FakerCreate(FakerAmountViewModel faker)
        {
            if (ModelState.IsValid)
            {
                var clientRepo = new PatientRepository();
                clientRepo.ClientFakerInsert(faker.Amount);

                return(RedirectToAction("List"));
            }

            ModelState.AddModelError(null, "Podaj właściwą liczbę rekordów");
            return(View(faker));
        }
コード例 #2
0
ファイル: PatientController.cs プロジェクト: sito92/Klinika
        public ViewResult FakerCreate()
        {
            var amount = new FakerAmountViewModel();

            return(View(amount));
        }