Exemple #1
0
 public async Task <IActionResult> Create([Bind("Id,Name,DateUpdated")] CityDTO city)
 {
     if (ModelState.IsValid)
     {
         _dbAccess.AddCity(city.Name);
         _dbAccess.SaveChanges();
         return(RedirectToAction(nameof(Index)));
     }
     return(View(city));
 }