Exemplo n.º 1
0
        public async Task <IActionResult> Create(
            CreateArtistViewModel viewModel)
        {
            try
            {
                viewModel.UserId = User
                                   .GetUserId()
                                   .ToString();

                ArtistCreationResult result = await _artistsService
                                              .AddArtistAsync(viewModel);

                return(RedirectToAction("ArtistLyrics", "Lyric", new { artistSlug = result.PrimarySlug }));
            }
            catch
            {
                return(View(viewModel));
            }
        }