コード例 #1
0
        public IHttpActionResult AddCategory(CreateCategoryRequest request)
        {
            var response = new CreateCategoryResponse();
            var dtoInput = AutoMapper.Mapper.Map <CreateNewCategoryInput>(request);

            try
            {
                _categoryBLL.AddNewCategory(dtoInput);
            }
            catch (Exception ex)
            {
                response.Messages = ex.Message;
                response.Success  = false;
            }
            return(Ok(response));
        }