Beispiel #1
0
 public void Create(PlaylistCreateViewModel model)
 {
     _logger.InfoFormat("Se ejecuto el Metodo {0}", MethodBase.GetCurrentMethod().Name);
     var customer = _customerRepository.Get().FirstOrDefault(c => c.Email == model.CustomerUserName);
     if (customer == null) throw new InvalidOperationException(string.Format("Cliente no encontrado {0}", model.CustomerUserName));
     var playList = new Playlist(){Name = model.Nombre,CustomerId = customer.Id};
     _playListRepository.Create(playList);
 }
Beispiel #2
0
 public PlayListViewModel(Playlist playList)
 {
     this.Id = playList.Id;
     this.Nombre = playList.Name;
 }