public ActionResult Play(int id, song song) { song.song_view = song.song_view + 1; db.Entry(song).State = EntityState.Modified; db.SaveChanges(); return(View()); }
public bool Delete(int?id) { try { var album = db.albums.Find(id); db.albums.Remove(album); db.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool Delete(int?id) { try { var song = db.songs.Find(id); db.songs.Remove(song); db.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public int Insert(author entity) { db.authors.Add(entity); db.SaveChanges(); return(entity.author_id); }
public int Insert(user entity) { db.users.Add(entity); db.SaveChanges(); return(entity.user_id); }