示例#1
0
        public JsonResult DeleteMessage(string chatType, string messageId)
        {
            var deleteResult = false;
            try
            {
                ChatServiceClient client = new ChatServiceClient(chatType);
                 deleteResult = client.RemoveChat(new Guid(messageId));

                return Json(new WcfResult("Deleted Message",deleteResult), JsonRequestBehavior.AllowGet);
            }
            catch (FaultException ex)
            {
                return Json(new WcfResult(ex.Message ,deleteResult), JsonRequestBehavior.AllowGet);

            }
            catch (Exception ex)
            {
                return Json(new WcfResult(ex.Message,deleteResult), JsonRequestBehavior.AllowGet);
            }

        }