Exemplo n.º 1
0
        public OperationResult Create(CreateProjectCategory command)
        {
            var operation = new OperationResult();

            var projectCategory = new ProjectCategory(command.Name);

            _projectCategoryRepository.Create(projectCategory);
            _projectCategoryRepository.SaveChanges();

            return(operation.Succedded());
        }
        public JsonResult OnPostCreate(CreateProjectCategory command)
        {
            var result = _projectCategoryApplication.Create(command);

            return(new JsonResult(result));
        }
        public IActionResult OnGetCreate()
        {
            var command = new CreateProjectCategory();

            return(Partial("./Create", command));
        }