public async Task <IActionResult> Create([Bind("ID,name,animalType,age,image")] Pet pet) { if (ModelState.IsValid) { _context.Add(pet); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(pet)); }
public async Task <IActionResult> Create([Bind("ID,name,birthday,city,image,facebookID")] Owner owner) { if (ModelState.IsValid) { _context.Add(owner); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(owner)); }
public async Task <IActionResult> Create([Bind("ID,name,zipCode,address,likes")] Park park) { if (ModelState.IsValid) { _context.Add(park); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(park)); }