public ActionResult Edit(Client client, int ArtistId, int StyleId) { if (ArtistId != 0) { _db.ArtistClientStyle.Add(new ArtistClientStyle() { StyleId = StyleId, ArtistId = ArtistId, ClientId = client.ClientId }); } _db.Entry(client).State = EntityState.Modified; _db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(Artist Artist) { _db.Entry(Artist).State = EntityState.Modified; _db.SaveChanges(); return(RedirectToAction("Index")); }