public TipClient Post(TipClientDTO value) { TipClient model = new TipClient() { Descriere = value.Descriere, Discount = value.Discount }; return(ITipClientRepository.Create(model)); }
public TipClient Put(int id, TipClientDTO value) { TipClient model = ITipClientRepository.Get(id); if (value.Descriere != null) { model.Descriere = value.Descriere; } if (value.Discount != 0) { model.Discount = value.Discount; } return(ITipClientRepository.Update(model)); }