Example #1
0
 public void Add(PostGroupViewModel model)
 {
     try
     {
         var registerCommand = _mapper.Map <AddPostGroupCommands>(model);
         Bus.SendCommand(registerCommand);
     }
     catch (Exception e)
     {
         Bus.RaiseEvent(new DomainNotification("", "出现错误,请稍后重试"));
     }
 }
Example #2
0
        public IActionResult AddUserClassify(string classifyName)
        {
            PostGroupViewModel model = new PostGroupViewModel(classifyName, int.Parse(_user.Id));

            _postGroupServer.Add(model);
            var error      = _notifications.GetNotifications().Select(n => n.Value);//通知结果
            var enumerable = error as string[] ?? error.ToArray();

            if (enumerable.Any())
            {
                return(new JsonResult(enumerable.FirstOrDefault()));
            }
            return(new JsonResult("success"));
        }
Example #3
0
 public void Update(PostGroupViewModel updatemodel)
 {
     throw new System.NotImplementedException();
 }