public CategoryModelResponse GetSubCategoriesByCategoryID(int?id)
        {
            if (id == 0)
            {
                id = null;
            }
            CategoryModelResponse categoryResponse = new CategoryModelResponse();

            try
            {
                List <Category> categories = _repository.Get(t => t.MasterCategoryID == id).ToList();


                categoryResponse.Categories = CategoryModel.GetCategoryModelFromData(categories);
                categoryResponse.SetStatus(ResponseCode.SUCCESS);
                return(categoryResponse);
            }
            catch (Exception ex)
            {
                categoryResponse.SetStatus(ResponseCode.FAILED_ON_DB_PROCESS, ex.Message);
                return(categoryResponse);
            }
        }