예제 #1
0
        public PageableData <UserModel> GetPage(string userName, int?state, int?typeId, int limit, int offset)
        {
            string condition = new ConditionHelper().And("Username", ref userName, CompareType.Like)
                               .And("State", state, CompareType.Equal)
                               //.And("TypeId", typeId, CompareType.Equal)
                               .ToString();


            var searchObj = new
            {
                Username = string.Format("%{0}%", userName),
                State    = state
            };

            return(_provider.GetPage(condition, searchObj, " order by Id ASC", offset, limit));
        }