/// <summary> /// 添加一组好友关系 /// </summary> /// <param name="userId1">好友1</param> /// <param name="userId2">好友2</param> public void AddFriend(int userId1, int userId2) { var friend = new hygl_friend { hy1_id = userId1, hy2_id = userId2, hy_time = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") }; var friend2 = new hygl_friend { hy1_id = userId2, hy2_id = userId1, hy_time = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") }; friendDB.hygl_friend.InsertOnSubmit(friend); friendDB.hygl_friend.InsertOnSubmit(friend2); friendDB.SubmitChanges(); }
partial void Deletehygl_friend(hygl_friend instance);
partial void Updatehygl_friend(hygl_friend instance);
partial void Inserthygl_friend(hygl_friend instance);