BootstrapAdmin/Bootstrap.DataAccess.MongoDB/Task.cs

22 lines
598 B
C#
Raw Normal View History

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>
public override IEnumerable<DataAccess.Task> RetrieveTasks()
{
var users = MongoDbAccessManager.DBAccess.GetCollection<DataAccess.Task>("Tasks");
return users.Find(FilterDefinition<DataAccess.Task>.Empty).SortByDescending(task => task.AssignTime).ToList();
}
}
}