public async Task <IActionResult> Create([Bind("ID,CanTalk,FeathersColor,Name,Gender,DateOfBirth,Weight")] Parrot parrot) { if (ModelState.IsValid) { _context.Add(parrot); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(parrot)); }
public async Task <IActionResult> Create([Bind("ID,Name,Gender,DateOfBirth,Weight")] Animal animal) { if (ModelState.IsValid) { _context.Add(animal); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(animal)); }
public async Task <IActionResult> Create([Bind("ID,AmountOfTeeth,NeedSaltWater,SkinColor,Name,Gender,DateOfBirth,Weight")] Shark shark) { if (ModelState.IsValid) { _context.Add(shark); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(shark)); }
public async Task <IActionResult> Create([Bind("ID,Age,HairColor,Name,Gender,DateOfBirth,Weight")] Gorilla gorilla) { if (ModelState.IsValid) { _context.Add(gorilla); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(gorilla)); }