/// <summary> /// Retrieve list of ChatMessage. /// no parameters required to be passed in. /// </summary> /// <returns>List of ChatMessage</returns> public ChatMessageList GetAll() { using (ChatMessageDataAccess data = new ChatMessageDataAccess(ClientContext)) { return(data.GetAll()); } }
/// <summary> /// Retrieve list of ChatMessage. /// </summary> /// <param name="fillChild"></param> /// <returns>List of ChatMessage</returns> public ChatMessageList GetAll(bool fillChild) { ChatMessageList chatMessageList = new ChatMessageList(); using (ChatMessageDataAccess data = new ChatMessageDataAccess(ClientContext)) { chatMessageList = data.GetAll(); } if (fillChild) { foreach (ChatMessage chatMessageObject in chatMessageList) { FillChatMessageWithChilds(chatMessageObject, fillChild); } } return(chatMessageList); }