2018-10-28 15:03:59 +08:00
|
|
|
|
using Longbow.Cache;
|
|
|
|
|
using Longbow.Data;
|
2018-10-19 23:09:52 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace Bootstrap.DataAccess
|
|
|
|
|
{
|
2018-10-28 15:03:59 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
2018-10-19 23:09:52 +08:00
|
|
|
|
public static class TaskHelper
|
|
|
|
|
{
|
2018-10-28 15:03:59 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const string RetrieveTasksDataKey = "TaskHelper-RetrieveTasks";
|
2018-10-19 23:09:52 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 查询所有任务
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2018-10-28 15:03:59 +08:00
|
|
|
|
public static IEnumerable<Task> RetrieveTasks() => CacheManager.GetOrAdd(RetrieveTasksDataKey, key => DbAdapterManager.Create<Task>().RetrieveTasks());
|
2018-10-19 23:09:52 +08:00
|
|
|
|
}
|
|
|
|
|
}
|