Esempio n. 1
0
 public void CreateArtist(ArtistDTO artistDTO)
 {
     using (var transaction = ArtistRepository.UnitOfWork.BeginTransaction(2))
     {
         ArtistRepository.Add(ArtistFactory.CreateArtist(artistDTO.Name, artistDTO.Description, artistDTO.Country, artistDTO.Year));
         transaction.Commit();
     }
 }
Esempio n. 2
0
 public void CreateArtist(ArtistDto artistDto)
 {
     using (var transaction = _artistRepository.unitOfWork.BeginTransaction(3))
     {
         _artistRepository.Add(ArtistFactory.CreateArtist(artistDto.DisplayName,
                                                          artistDto.Firstname,
                                                          artistDto.Lastname,
                                                          artistDto.ArtistDetails));
     }
 }