BootstrapAdmin/Bootstrap.DataAccess/Helper/LogHelper.cs

28 lines
792 B
C#
Raw Normal View History

using Longbow.Data;
using Longbow.Web.Mvc;
using PetaPoco;
using System;
2018-10-19 23:09:52 +08:00
namespace Bootstrap.DataAccess
{
/// <summary>
///
/// </summary>
2018-10-19 23:09:52 +08:00
public static class LogHelper
{
/// <summary>
/// 查询所有日志信息
/// </summary>
/// <param name="op"></param>
2018-10-19 23:09:52 +08:00
/// <returns></returns>
public static Page<Log> Retrieves(PaginationOption op, DateTime? startTime, DateTime? endTime, string opType) => DbContextManager.Create<Log>().Retrieves(op, startTime, endTime, opType);
2018-10-19 23:09:52 +08:00
/// <summary>
/// 保存新增的日志信息
/// </summary>
/// <param name="p"></param>
/// <returns></returns>
public static bool Save(Log p) => DbContextManager.Create<Log>().Save(p);
2018-10-19 23:09:52 +08:00
}
}