public static UserInfo GetCurrentUser(ClaimsPrincipal user, IUserRepositry _userService) { var userObj = (User)_userService.GetById(GetCurrentUserId(user)); return(new UserInfo() { Id = userObj.UserId, UserName = userObj.UserName }); }
public ActionResult GetUserById(int UserId) { User model = genericRepository.GetById(UserId); return(Ok(model)); }
public static User GetCurrentUserById(long id, IUserRepositry _userService) { return((User)_userService.GetById(id)); }