public int AddMusic(MusicDetails music) { var allParam = new DynamicParameters(); allParam.Add("id", dbType: DbType.Int32, direction: ParameterDirection.Output); allParam.Add("name", music.Name); allParam.Add("entityType", EntityTypeEnum.Music.GetHashCode()); var result = _dataAccessor.QuerySingle <int>(INSERT, allParam); var newId = allParam.Get <int>("id"); return(_dataAccessor.QuerySingle <int>(INSERT_MUSIC, new { entityId = newId, music.ImageFilePath, music.SpotifyLink, music.YearReleased, music.Name })); }
public IActionResult UpdateMusic(MusicDetails music) { _entityService.UpdateMusicDetails(music); return(MusicList()); }
public IActionResult AddMusic(MusicDetails musicDetails) { _entityService.AddMusic(musicDetails); return(MusicList()); }
public IActionResult CreateMusic() { var newMusic = new MusicDetails(); return(View("CreateMusic", newMusic)); }
public int UpdateMusicDetails(MusicDetails music) { throw new System.NotImplementedException(); }