增加功能:完善Message类方法
This commit is contained in:
parent
a6d971c3a9
commit
2e273ef13e
|
@ -3,11 +3,18 @@ using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Bootstrap.DataAccess.MongoDB
|
namespace Bootstrap.DataAccess.MongoDB
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public class Message : DataAccess.Message
|
public class Message : DataAccess.Message
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userName"></param>
|
||||||
|
/// <returns></returns>
|
||||||
protected override IEnumerable<DataAccess.Message> RetrieveMessages(string userName)
|
protected override IEnumerable<DataAccess.Message> RetrieveMessages(string userName)
|
||||||
{
|
{
|
||||||
//TODO: 完善其他字段信息
|
|
||||||
var msg = MongoDbAccessManager.DBAccess.GetCollection<DataAccess.Message>("Messages");
|
var msg = MongoDbAccessManager.DBAccess.GetCollection<DataAccess.Message>("Messages");
|
||||||
return msg.Find(message => message.To == userName || message.From == userName).ToList();
|
return msg.Find(message => message.To == userName || message.From == userName).ToList();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue