Example #1
0
 public void ChangeForumState(ChangeForumState model)
 {
     if (ModelState.IsValid)
     {
         _forumservice.ChangeForumState(model);
     }
 }
Example #2
0
        /// <summary>
        /// 使用軟刪除 修改State 為 false
        /// </summary>
        /// <param name="model"></param>
        public void ChangeForumState(ChangeForumState model)
        {
            Forums forum = _Forums.GetAll().FirstOrDefault(f => f.RouteName == model.RouteName);

            forum.State     = model.State;
            forum.RejectMsg = model.RejectMsg;
            _Forums.Update(forum);
            _Forums.SaveContext();
        }