public async Task <IActionResult> Create([Bind("albumId,id,title,url,thumbnailUrl")] Photo photo) { if (ModelState.IsValid) { _context.Add(photo); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(photo)); }
public async Task <IActionResult> Create([Bind("id,userId,title")] Album album) { if (ModelState.IsValid) { _context.Add(album); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(album)); }