public JsonResult Attention(int userid) { var user = _workContext.CurrentUser; var res = _firendService.AddOrCanelFirend(user.Id, userid); return(Json(res)); }
public ActionResult AttentionTest() { var user = _userService.GetAllUsers(); var me = _userService.GetUserByUsername("stoneniqiu"); foreach (var u in user) { _firendService.AddOrCanelFirend(me.Id, u); } return(Content("success Attention")); }