You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CaiQie/DB/Service/PointLogService.cs

34 lines
763 B
C#

1 month ago
using Chloe;
using DB.Entity;
namespace DB.Service
1 month ago
{
public class PointLogService
{
1 month ago
public void Add(PointLog entityLog)
{
using (var dbContext = DbFactory.GetContext)
{
dbContext.Insert(entityLog);
}
}
public PagingResult<PointLog> GetPagedList(int pageIndex, int pageSize, string key)
{
using (var dbContext = DbFactory.GetContext)
{
var dao = dbContext.Query<PointLog>()
.WhereIf(!string.IsNullOrEmpty(key),x=>x.PointName.Contains(key))
.OrderByDesc(x => x.ID)
.Paging(pageIndex, pageSize);
return dao;
}
}
1 month ago
}
}