Example #1
0
        public JsonResult GetMessageList(MessageFilterModel filter)
        {
            var messageListDb = this.vkProvider.GetVkMessages(filter);
            var messageList   = Mapper.Map <List <VkMessage>, List <MessageModel> >(messageListDb.ToList());

            var model = new MessageViewModel
            {
                MessageList    = messageList,
                TotalItemCount = messageList.Count()
            };

            return(Json(model, JsonRequestBehavior.AllowGet));
        }
Example #2
0
 private Expression <Func <VkMessage, bool> > GetFilters(MessageFilterModel filter)
 {
     return(PredicateBuilder.New <VkMessage>());
 }
Example #3
0
        public IQueryable <VkMessage> GetVkMessages(MessageFilterModel filter)
        {
            var predicate = this.GetFilters(filter);

            return(this.vkMessRepository.Filter(predicate));
        }