示例#1
0
        public IActionResult AddProblem([FromBody] Problem problem)
        {
            Dictionary <string, object> res;

            try
            {
                res = CategoryData.AddProblem(problem);
                return(Ok(res));
            }
            catch (System.Exception ex)
            {
                res = Service.createErrorRes(ex.Message);
                return(BadRequest(res));
            }
        }