public dynamic GetContentListByKeyword(JObject obj)
        {
            int            total  = 0;
            MembershipUser mu     = Membership.GetUser();
            int            userId = 0;
            //userId = Convert.ToInt32(mu.ProviderUserKey);
            //  userId = SessionManager.LoggedInUser.UserID;

            ContentFilters filter = obj.ToObject <ContentFilters>();

            //string[] strArray = null;
            //if (string.IsNullOrEmpty(filter.categoryname))
            //    strArray = string.Join(",", GetPreference(userId).Select(v => v.Preference)).Split(',');
            //else
            //    strArray = filter.categoryname.Split(',');

            //List<string> myList = strArray.ToList();

            //List<smContentLibrary> contentlist = null;
            List <smContentLibrary> contentlist = new List <smContentLibrary>(0);

            //if (myList[0] != "")
            //{
            contentlist = _homeService.GetCategoryList(filter.limit, filter.offset, filter.order, filter.sort, filter.UserType, filter.IndustryId, out total);
            //}

            var result = new
            {
                total = total,
                rows  = contentlist,
            };

            return(result);
        }
        public dynamic GetContentListByPreference(JObject obj)
        {
            int            total  = 0;
            int            userId = 0;
            ContentFilters filter = obj.ToObject <ContentFilters>();
            //string[] strArray = null;

            var strArray = GetPreference(filter.UserId);
            List <smContentLibrary> contentlist = new List <smContentLibrary>(0);

            contentlist = _homeService.GetCategoryListByPrefrence(strArray, filter.limit, filter.offset, filter.order, filter.sort, filter.UserType, filter.IndustryId, filter.UserId, out total);
            var result = new
            {
                total = total,
                rows  = contentlist,
            };

            return(result);
        }