public void AddMusicianToSong(int songId, MusicianRegisterViewModel musician) { var recordingId = _songRepository.Get(s => s.id == songId).recordingid; _recordingPartyRepository.Add(new recording_party { recordingid = recordingId, partyrealid = musician.PartyRealId, rolecode = musician.Role.RoleCode, instrumentcode = musician.Instrument.IdCode, updatedby = "User", // Replace with user updatedon = DateTime.Now, createdby = "User", createdon = DateTime.Now, status = 2 }); _unitOfWork.Commit(); }
public IHttpActionResult AddMusicianToSong(int albumId, int songId, [FromBody] MusicianRegisterViewModel musician) { _songService.AddMusicianToSong(songId, musician); return(Ok()); }