示例#1
0
        public OperationResult Edit(EditProjectCategory command)
        {
            var operation       = new OperationResult();
            var projectCategory = _projectCategoryRepository.Get(command.Id);

            if (projectCategory == null)
            {
                return(operation.Failed(ApplicationMessages.RecordNotFound));
            }


            projectCategory.Edit(command.Name);

            _projectCategoryRepository.SaveChanges();

            return(operation.Succedded());
        }
        public JsonResult OnPostEdit(EditProjectCategory command)
        {
            var result = _projectCategoryApplication.Edit(command);

            return(new JsonResult(result));
        }