public async Task <IActionResult> Create([Bind("region_id,country_id,name")] Region region) { if (ModelState.IsValid) { _context.Add(region); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(region)); }
public async Task <IActionResult> Create([Bind("RegionID,Id,Name,ResourceTypeId,Lng,Lat,Description,URL")] Resource resource) { if (ModelState.IsValid) { _context.Add(resource); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(resource)); }