Beispiel #1
0
        public void Create(CreateMagazineViewModel magazineViewModel)
        {
            var magazine = new Magazine()
            {
                Id                = magazineViewModel.Id,
                Name              = magazineViewModel.Name,
                Number            = magazineViewModel.Number,
                YearOfPublication = magazineViewModel.YearOfPublication
            };

            _magazineRepository.Create(magazine);
        }
Beispiel #2
0
 public async Task Create(CreateMagazineView createMagazine)
 {
     await _magazineRepository.Create(new Magazine { Title = createMagazine.Title, Price = createMagazine.Price });;
 }