using Longbow.Data; using Longbow.Web.Mvc; using PetaPoco; using System; using System.Collections.Generic; namespace Bootstrap.DataAccess { /// /// /// public static class LogHelper { /// /// 查询所有日志信息 /// /// /// public static Page RetrievePages(PaginationOption op, DateTime? startTime, DateTime? endTime, string opType) => DbContextManager.Create().RetrievePages(op, startTime, endTime, opType); /// /// 查询所有日志信息 /// /// public static IEnumerable RetrieveAll(DateTime? startTime, DateTime? endTime, string opType) => DbContextManager.Create().RetrieveAll(startTime, endTime, opType); /// /// 保存新增的日志信息 /// /// /// public static bool Save(Log log) { if (log.Id == string.Empty) log.Id = null; log.LogTime = DateTime.Now; return DbContextManager.Create().Save(log); } } }