Пример #1
0
        /// <summary>
        /// Opens window for new song adding
        /// </summary>
        private void AddExecute()
        {
            try
            {
                CreateSong createSong = new CreateSong();
                createSong.ShowDialog();

                if ((createSong.DataContext as CreateSongViewModel).Update == true)
                {
                    SongList = GetSongs();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Пример #2
0
 public async Task <IActionResult> Post([FromBody] CreateSong command)
 {
     return(command == null?
            UnprocessableEntity()
                : Ok(await _mediator.Send(command)));
 }
 public CreateSongViewModel(CreateSong createSongOpen)
 {
     createSong = createSongOpen;
     Song       = new tblSong();
 }