예제 #1
0
        public IHttpActionResult Create(RestauranteViewModel restaurante)
        {
            try
            {
                var restauranteDomain = Mapper.Map <RestauranteViewModel, Domain.Entities.Restaurante>(restaurante);
                _restauranteApp.Add(restauranteDomain);

                return(Content(HttpStatusCode.OK, restauranteDomain));
            }
            catch (Exception ex)
            {
                return(Content(HttpStatusCode.InternalServerError, ex.ToString()));
            }
        }