public Entity.BaseResponse <Entity.SearchResult <List <Entity.DeviceTypeDetail> > > GetBySearch(string parentEntityGuid = "", string searchText = "", int?pageNo = 1, int?pageSize = 10, string orderBy = "") { Entity.BaseResponse <Entity.SearchResult <List <Entity.DeviceTypeDetail> > > response = new Entity.BaseResponse <Entity.SearchResult <List <Entity.DeviceTypeDetail> > >(true); try { response.Data = _service.List(new Entity.SearchRequest() { EntityId = string.IsNullOrEmpty(parentEntityGuid) ? Guid.Empty : new Guid(parentEntityGuid), SearchText = searchText, PageNumber = pageNo.Value, PageSize = pageSize.Value, OrderBy = orderBy }); } catch (Exception ex) { base.LogException(ex); return(new Entity.BaseResponse <Entity.SearchResult <List <Entity.DeviceTypeDetail> > >(false, ex.Message)); } return(response); }