public ImageFile ConvertDTOToEntity(ImageFileDetail_ImageFileDTO ImageFileDetail_ImageFileDTO)
        {
            ImageFile ImageFile = new ImageFile();

            ImageFile.Id   = ImageFileDetail_ImageFileDTO.Id;
            ImageFile.Path = ImageFileDetail_ImageFileDTO.Path;
            ImageFile.Name = ImageFileDetail_ImageFileDTO.Name;
            return(ImageFile);
        }
        public async Task <ImageFileDetail_ImageFileDTO> Get([FromBody] ImageFileDetail_ImageFileDTO ImageFileDetail_ImageFileDTO)
        {
            if (!ModelState.IsValid)
            {
                throw new MessageException(ModelState);
            }

            ImageFile ImageFile = await ImageFileService.Get(ImageFileDetail_ImageFileDTO.Id);

            return(new ImageFileDetail_ImageFileDTO(ImageFile));
        }
        public async Task <ActionResult <ImageFileDetail_ImageFileDTO> > Delete([FromBody] ImageFileDetail_ImageFileDTO ImageFileDetail_ImageFileDTO)
        {
            if (!ModelState.IsValid)
            {
                throw new MessageException(ModelState);
            }

            ImageFile ImageFile = ConvertDTOToEntity(ImageFileDetail_ImageFileDTO);

            ImageFile = await ImageFileService.Delete(ImageFile);

            ImageFileDetail_ImageFileDTO = new ImageFileDetail_ImageFileDTO(ImageFile);
            if (ImageFile.IsValidated)
            {
                return(ImageFileDetail_ImageFileDTO);
            }
            else
            {
                return(BadRequest(ImageFileDetail_ImageFileDTO));
            }
        }