Esempio n. 1
0
        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));
        }
Esempio n. 3
0
 public static User GetCurrentUserById(long id, IUserRepositry _userService)
 {
     return((User)_userService.GetById(id));
 }