public void Create(CreateMagazineViewModel magazineViewModel) { var magazine = new Magazine() { Id = magazineViewModel.Id, Name = magazineViewModel.Name, Number = magazineViewModel.Number, YearOfPublication = magazineViewModel.YearOfPublication }; _magazineRepository.Create(magazine); }
public async Task Create(CreateMagazineView createMagazine) { await _magazineRepository.Create(new Magazine { Title = createMagazine.Title, Price = createMagazine.Price });; }