Exemplo n.º 1
0
        public IHttpActionResult UpdateVideoCout(video v)
        {
            var videoupdate = db.videoList.Find(v.videoID);

            videoupdate.videoID          = v.videoID;
            videoupdate.videoName        = v.videoName;
            videoupdate.videoPic         = v.videoPic;
            videoupdate.videoSource      = v.videoSource;
            videoupdate.videoListened    = v.videoListened;
            videoupdate.videoTimerelease = v.videoTimerelease;
            db.Entry(videoupdate).State  = System.Data.Entity.EntityState.Modified;
            db.SaveChanges();
            return(Ok(videoupdate));
        }
Exemplo n.º 2
0
        public IHttpActionResult UpdateSongCout(song s)
        {
            var songupdate = db.songList.Find(s.songCode);

            songupdate.songName        = s.songName;
            songupdate.songPicture     = s.songPicture;
            songupdate.albumID         = s.albumID;
            songupdate.songCode        = s.songCode;
            songupdate.songSinger      = s.songSinger;
            songupdate.songSource      = s.songSource;
            songupdate.songType        = s.songType;
            songupdate.songListened    = s.songListened;
            songupdate.timRelease      = s.timRelease;
            db.Entry(songupdate).State = System.Data.Entity.EntityState.Modified;
            db.SaveChanges();
            return(Ok(songupdate));
        }