Beispiel #1
0
        public async Task <IActionResult> Delete(GalleryItem[] galleryItems, bool deleteFromFileSystem)
        {
            // DELETE galleryitems/delete
            try
            {
                return(new JsonResult(await _galleryObjectController.DeleteGalleryItems(galleryItems, deleteFromFileSystem)));
            }
            catch (Exception ex)
            {
                AppEventController.LogError(ex);

                return(StatusCode(500, _exController.GetExString(ex)));
            }
        }
        public ActionResult Delete(GalleryItem[] galleryItems, bool deleteFromFileSystem)
        {
            // DELETE galleryitems/delete
            try
            {
                return(GalleryObjectController.DeleteGalleryItems(galleryItems, deleteFromFileSystem));
            }
            catch (Exception ex)
            {
                AppEventController.LogError(ex);

                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError)
                {
                    Content      = Utils.GetExStringContent(ex),
                    ReasonPhrase = "Server Error"
                });
            }
        }