public Magazin Post(MagazinDTO value) { Magazin model = new Magazin() { Nume = value.Nume, Adresa = value.Adresa }; return(IMagazinRepository.Create(model)); }
public Magazin Put(int id, MagazinDTO value) { Magazin model = IMagazinRepository.Get(id); if (value.Nume != null) { model.Nume = value.Nume; } if (value.Adresa != null) { model.Adresa = value.Adresa; } return(IMagazinRepository.Update(model)); }