public static bool UpdateLM(LyricsMusic lm) { var en = new ProjectNCTEntities(); var item = en.LyricsMusics.SingleOrDefault(s => s.ID == lm.ID); item.LMusicDetail = lm.LMusicDetail; return(en.SaveChanges() > 0 ? true : false); }
public IHttpActionResult Update(LyricsMusic lyricsMusic) { if (new Repositories().UpdateLyrics(lyricsMusic)) { return(Ok()); } return(InternalServerError()); }
public static bool CreateLM(LyricsMusic lm) { lm.LMusicDayCreate = DateTime.Now; var en = new ProjectNCTEntities(); en.LyricsMusics.Add(lm); return(en.SaveChanges() > 0 ? true : false); }
public bool UpdateLyrics(LyricsMusic lyricsMusic) { if (new LyricsMusicBus().Update(lyricsMusic)) { return(true); } return(false); }
public bool Update(LyricsMusic lyricsMusic) { lyricsMusic.UserID = lyricsMusic.UserID; if (new LyricsMusicDao().Update(lyricsMusic)) { return(true); } return(false); }
public bool Create(LyricsMusic lyricsMusic) { lyricsMusic.LMusicDayCreate = DateTime.Now; if (new LyricsMusicDao().Create(lyricsMusic)) { return(true); } return(false); }
public bool Create(LyricsMusic lyricsMusic) { db.LyricsMusics.Add(lyricsMusic); if (db.SaveChanges() > 0) { return(true); } return(false); }
// PUT api/<controller>/5 public IHttpActionResult Put(int id, LyricsView lv) { var item = new LyricsMusic { ID = lv.ID, LMusicDayCreate = lv.LMusicDayCreate, LMusicDetail = lv.LMusicDetail, MusicID = lv.MusicID, UserID = lv.UserID }; var res = Repositories.UpdateLM(item); if (res == true) { return(Ok()); } return(InternalServerError()); }
public bool Update(LyricsMusic lyricsMusic) { var data = db.LyricsMusics.SingleOrDefault(s => s.ID == lyricsMusic.ID); data.LMusicDetail = lyricsMusic.LMusicDetail; data.MusicID = lyricsMusic.MusicID; data.UserID = lyricsMusic.UserID; if (db.SaveChanges() > 0) { return(true); } return(false); }
public static bool UpdateLM(LyricsMusic lm) { return(MusicBUS.UpdateLM(lm)); }
public static bool CreateLM(LyricsMusic lm) { return(MusicBUS.CreateLM(lm)); }
public static bool UpdateLM(LyricsMusic lm) { return(LyricsMusicDAO.UpdateLM(lm)); }
public static bool CreateLM(LyricsMusic lm) { return(LyricsMusicDAO.CreateLM(lm)); }