//details public AttachmentItem GetAttachmentItem(AttachmentItemKeyModel model) { if (!_authorization.Details(model)) { throw new UnauthorizedAccessException(); } return(_business.GetAttachmentItem(model)); }
public ActionResult GetInfo(AttachmentItemKeyModel model) { try { var attachmentItem = attachmentBusiness.GetAttachmentItem(model);//check details permission if (attachmentItem == null) { return(NotFound()); } return(Ok(attachmentItem)); } catch (Exception) { return(BadRequest()); } }