Пример #1
0
        public TipClient Post(TipClientDTO value)
        {
            TipClient model = new TipClient()
            {
                Descriere = value.Descriere,
                Discount  = value.Discount
            };

            return(ITipClientRepository.Create(model));
        }
Пример #2
0
        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));
        }