コード例 #1
0
        public async Task <IActionResult> Create([Bind("Id,Name,Country,YearOfCreation,Description,Rating")] City city)
        {
            if (ModelState.IsValid)
            {
                await _cityRepository.AddAsyn(city);

                return(RedirectToAction(nameof(Index)));
            }
            return(View(city));
        }