예제 #1
0
 /// <summary>
 /// 插入用户;
 /// </summary>
 /// <param name="user">用户</param>
 /// <returns>受影响行数</returns>
 public int Insert(User user)
 => EfHelper.Save(user, EntityState.Added, "您提交的用户号已存在");
예제 #2
0
 /// <summary>
 /// 查询用户;
 /// </summary>
 /// <param name="userNo">用户号</param>
 /// <returns>用户</returns>
 public User Select(string userNo)
 => EfHelper.SelectOne <User>(u => u.No == userNo);
예제 #3
0
 /// <summary>
 /// 更新用户;
 /// </summary>
 /// <param name="user">用户</param>
 /// <returns>受影响行数</returns>
 public int Update(User user)
 => EfHelper.Save(user, EntityState.Modified);
예제 #4
0
 /// <summary>
 /// 查询用户计数;
 /// </summary>
 /// <param name="userNo">用户号</param>
 /// <returns>计数</returns>
 public int SelectCount(string userNo)
 => EfHelper.SelectCount <User>(u => u.No == userNo);