Пример #1
0
        public IActionResult Index()
        {
            ViewBag.Name      = _nameService.GetName();
            ViewBag.ListCount = 0;
            var addPersonResult = _personGenericService.AddList(new Person
            {
                Name = "Test Name",
                Age  = 999
            });

            if (addPersonResult)
            {
                ViewBag.ListCount = _personGenericService.GetListCount();
            }

            return(View());
        }