public User GetUser(string userid, string pwd) { var res = DapperHelper.GetList <User>(new { UserID = userid, Password = pwd }).FirstOrDefault(); return(res); }
public User GetUser(int id) { var res = DapperHelper.Get <User>(id); return(res); }
/// <summary> /// 更新密码 /// </summary> /// <param name="entity"></param> /// <returns></returns> public int?UpdatePwd(User entity) { string sql = @"UPDATE T_USER SET Password=@Password WHERE ID=@ID"; return(DapperHelper.Excute(sql, entity)); }
public List <User> GetList(object whereConditions = null) { return(DapperHelper.GetList <User>(whereConditions).ToList()); }
public int Update(User entity) { return(DapperHelper.Update(entity)); }
/// <summary> /// 修改头像 /// </summary> /// <param name="entity"></param> /// <returns></returns> public int?UpdateImage(User entity) { string sql = @"UPDATE T_USER SET HeadImg=@HeadImg WHERE ID=@ID"; return(DapperHelper.Excute(sql, entity)); }
public int Add(User entity) { return(DapperHelper.Insert(entity)); }
/// <summary> /// 添加产品,返回主键ID /// </summary> /// <param name="entity"></param> /// <returns></returns> public int Insert(Product entity) { return(DapperHelper.Insert(entity)); }
public List <Product> GetList() { return(DapperHelper.GetList <Product>().ToList()); }
public List <Customer> GetList() { return(DapperHelper.GetList <Customer>().ToList()); }
/// <summary> /// 添加销售记录 /// </summary> /// <param name="entity"></param> /// <returns></returns> public int Insert(SellOrder entity) { return(DapperHelper.Insert(entity)); }