public string GetUserByUserInRoleGuid(string odsCode, Guid userInRoleGuid) { OpenHRUser user = DataStore .Users .FirstOrDefault(t => t.Organisation.nationalPracticeCode == odsCode && userInRoleGuid.Equals(new Guid(t.UserInRole.id))); string result = string.Empty; if (user != null) { EomUserDetails37.UserDetails userDetails = EomUsersTransform.ToEomUserDetails(user); result = Utilities.Serialize <EomUserDetails37.UserDetails>(userDetails); } return(result); }
public string GetUserByID(string odsCode, int userInRoleId) { OpenHRUser user = DataStore .Users .FirstOrDefault(t => t.Organisation.nationalPracticeCode == odsCode && t.OpenHRUserId == userInRoleId); string result = string.Empty; if (user != null) { EomUserDetails37.UserDetails userDetails = EomUsersTransform.ToEomUserDetails(user); result = Utilities.Serialize <EomUserDetails37.UserDetails>(userDetails); } return(result); }