using Longbow.Cache;
using Longbow.Data;
using System.Collections.Generic;
namespace Bootstrap.DataAccess
{
///
///
///
public static class TaskHelper
{
///
///
///
public const string RetrieveTasksDataKey = "TaskHelper-RetrieveTasks";
///
/// 查询所有任务
///
///
public static IEnumerable Retrieves() => CacheManager.GetOrAdd(RetrieveTasksDataKey, key => DbContextManager.Create().Retrieves());
///
/// 保存任务方法
///
///
///
public static bool Save(Task task) => DbContextManager.Create().Save(task);
}
}