BootstrapAdmin11/Bootstrap.DataAccess/Helper/TaskHelper.cs

23 lines
612 B
C#
Raw Normal View History

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