Пример #1
0
        // PUT api/<controller>/5
        /// <summary>
        /// Modifica un consorcio
        /// </summary>
        /// <param name="consortium">Consorcio a modificar</param>
        /// <returns></returns>
        public IHttpActionResult Put(int id, ConsortiumRequest consortium)
        {
            var originalConsortium = ConsortiumService.GetById(id);

            var ret = ConsortiumService.UpdateConsortium(originalConsortium, consortium);

            return(Ok());
        }
Пример #2
0
        public IHttpActionResult Get(int id)
        {
            var completeConsortium = ConsortiumService.GetById(id);

            if (completeConsortium == null)
            {
                throw new NotFoundException(ErrorMessages.ConsorcioNoEncontrado);
            }

            var dto = Mapper.Map <ConsortiumResponse>(completeConsortium);

            return(Ok(dto));
        }