public async Task <IActionResult> Create([Bind("ID,Name,Color,Region,ImageLocation")] Bird bird) { if (ModelState.IsValid) { _context.Add(bird); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(bird)); }
public async Task <IActionResult> Create([Bind("ID,Name,Bird,Description,ImageLocation,DateSeen")] UsersBirds usersBirds) { if (ModelState.IsValid) { _context.Add(usersBirds); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(usersBirds)); }