コード例 #1
0
        public IHttpActionResult UpdateBuilding(BuildingBindingModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                Cad.UpdateBuilding(User.Identity.GetUserId(), model.BuildingName, model.Address);
            }
            catch (ConnectedApartmentsException e)
            {
                return(BadRequest(e.Message));
            }
            catch (Exception)
            {
                return(InternalServerError());
            }
            return(GetResponse());
        }