增加功能:完善Message类方法

This commit is contained in:
Argo-MacBookPro 2018-10-31 17:50:13 +08:00
parent a6d971c3a9
commit 2e273ef13e
1 changed files with 8 additions and 1 deletions

View File

@ -3,11 +3,18 @@ using System.Collections.Generic;
namespace Bootstrap.DataAccess.MongoDB
{
/// <summary>
///
/// </summary>
public class Message : DataAccess.Message
{
/// <summary>
///
/// </summary>
/// <param name="userName"></param>
/// <returns></returns>
protected override IEnumerable<DataAccess.Message> RetrieveMessages(string userName)
{
//TODO: 完善其他字段信息
var msg = MongoDbAccessManager.DBAccess.GetCollection<DataAccess.Message>("Messages");
return msg.Find(message => message.To == userName || message.From == userName).ToList();
}