public IActionResult UpdateFloorPlanConfig(int id, [FromBody] string svg) { var entity = _service.Floors.Id(id).FirstOrDefault(); if (entity == null) { return(NotFound(new AppResultBuilder().NotFound())); } var validationResult = _service.ValidateUpdateFloorPlanConfig( User, entity, svg); if (!validationResult.Valid) { return(BadRequest(validationResult.Result)); } _service.UpdateFloorPlanSvg(entity, svg); context.SaveChanges(); return(NoContent()); }