public async Task <string> DeleteCategory(DeleteCategoryInputDto deleteinput)
        {
            var findcategory = await FindCategory(deleteinput.DeleteCategory);

            var result = CategoryRepoditory.Delete(findcategory.Id);
            await CategoryRepoditory.Save();

            return(result);
        }
Example #2
0
        public async Task <IActionResult> Delete([FromBody] DeleteCategoryInputDto deleteinput)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            var result = await CategoryServise.DeleteCategory(deleteinput);

            return(Ok(result));
        }