Ejemplo n.º 1
0
        public async Task <ActionResult> Edit(long id, Producer producer)
        {
            if (id != producer.Id)
            {
                return(BadRequest());
            }

            try
            {
                await _producer.Edit(producer);
            }
            catch (DbUpdateConcurrencyException) when(!ProducerExists(id))
            {
                return(NotFound());
            }

            return(Ok());
        }
Ejemplo n.º 2
0
 public void Edit(Producer producer)
 {
     _producerRepository.Edit(producer);
 }