public async Task <ActionResult <Place_PlaceDTO> > Create([FromBody] Place_PlaceDTO Place_PlaceDTO)
        {
            if (!ModelState.IsValid)
            {
                throw new BindException(ModelState);
            }

            if (!await HasPermission(Place_PlaceDTO.Id))
            {
                return(Forbid());
            }

            Place Place = ConvertDTOToEntity(Place_PlaceDTO);

            Place = await PlaceService.Create(Place);

            Place_PlaceDTO = new Place_PlaceDTO(Place);
            if (Place.IsValidated)
            {
                return(Place_PlaceDTO);
            }
            else
            {
                return(BadRequest(Place_PlaceDTO));
            }
        }
        public async Task <ActionResult <Place_PlaceDTO> > Get([FromBody] Place_PlaceDTO Place_PlaceDTO)
        {
            if (!ModelState.IsValid)
            {
                throw new BindException(ModelState);
            }

            if (!await HasPermission(Place_PlaceDTO.Id))
            {
                return(Forbid());
            }

            Place Place = await PlaceService.Get(Place_PlaceDTO.Id);

            return(new Place_PlaceDTO(Place));
        }
        private Place ConvertDTOToEntity(Place_PlaceDTO Place_PlaceDTO)
        {
            Place Place = new Place();

            Place.Id           = Place_PlaceDTO.Id;
            Place.Name         = Place_PlaceDTO.Name;
            Place.PlaceGroupId = Place_PlaceDTO.PlaceGroupId;
            Place.Radius       = Place_PlaceDTO.Radius;
            Place.Latitude     = Place_PlaceDTO.Latitude;
            Place.Longtitude   = Place_PlaceDTO.Longtitude;
            Place.PlaceGroup   = Place_PlaceDTO.PlaceGroup == null ? null : new PlaceGroup
            {
                Id       = Place_PlaceDTO.PlaceGroup.Id,
                ParentId = Place_PlaceDTO.PlaceGroup.ParentId,
                Name     = Place_PlaceDTO.PlaceGroup.Name,
                Code     = Place_PlaceDTO.PlaceGroup.Code,
            };
            Place.BaseLanguage = CurrentContext.Language;
            return(Place);
        }