public IActionResult Delete(int id)
        {
            var frequency = _blFrequency.Get(id);

            if (frequency == null)
            {
                return(Json(new { success = false, message = "Frequency does not exists" }));
            }
            _blFrequency.Delete(id);

            return(Json(new { success = true, message = "Frequency deleted successfully", frequency }));
        }
Exemple #2
0
        public IActionResult Delete(int id)
        {
            var category = _blCategory.Get(id);

            if (category == null)
            {
                return(Json(new { success = false, message = "Category does not exists" }));
            }
            _blCategory.Delete(id);

            return(Json(new { success = true, message = "Category deleted successfully", category }));
        }