public IHttpActionResult Delete(int id) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanDelete)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.CushionMng bll = new BLL.CushionMng(Helper.AuthHelper.GetCurrentUserFolder(ControllerContext)); Library.DTO.Notification notification; bll.DeleteData(id, ControllerContext.GetAuthUserId(), out notification); if (notification.Type == Library.DTO.NotificationType.Error) { return(InternalServerError(new Exception(notification.Message))); } return(Ok(new Library.DTO.ReturnData <int>() { Data = id, Message = notification })); }