public void AllMessagesWasRead(Chat chat) { if (chat.CountOfUnreadMessages > 0) { chat.CountOfUnreadMessages = 0; _chatManager.AllMessagesWasReadWith(chat.Name); } }