2018-10-30 13:07:29 +08:00
|
|
|
|
using MongoDB.Driver;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace Bootstrap.DataAccess.MongoDB
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class Task : DataAccess.Task
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2019-01-11 23:20:28 +08:00
|
|
|
|
public override IEnumerable<DataAccess.Task> Retrieves()
|
2018-10-30 13:07:29 +08:00
|
|
|
|
{
|
2019-01-15 12:52:09 +08:00
|
|
|
|
var users = DbManager.DBAccess.GetCollection<DataAccess.Task>("Tasks");
|
2018-10-30 13:07:29 +08:00
|
|
|
|
return users.Find(FilterDefinition<DataAccess.Task>.Empty).SortByDescending(task => task.AssignTime).ToList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|