DAL/BrandDAL.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using GoodsProject.Model;
namespace GoodsProject.DAL
{
public class BrandDAL
{
CommodityDBDataContext db = new CommodityDBDataContext();
#region 获取品牌信息
public List<BrandInfo> GetBrandList(int index, int pagesize, out int count)
{
var sql = from n in db.TB_Brand.OrderBy(o => o.CreateDate)
select new BrandInfo
{
ID = n.ID,
BrandName = n.BrandName,
IsShow = n.IsShow,
CreateDate = n.CreateDate,
Remarks = n.Remarks
};
var data = sql.ToList();
count = data.Count();
var result = data.Skip((index - 1) * pagesize).Take(pagesize).OrderBy(w => w.CreateDate).OrderByDescending(w => w.CreateDate).ToList();
return result;
}
#endregion
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。