public async Task <IActionResult> Create([Bind("PlaceID,PlaceAdress,PlaceDescription")] Place place) { if (ModelState.IsValid) { _context.Add(place); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(place)); }
public async Task <IActionResult> Create([Bind("ToolID,Type,Description,PlaceID")] Tool tool) { if (ModelState.IsValid) { _context.Add(tool); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } PlaceList(tool.PlaceID); return(View(tool)); }