public UserTable GetUserById(int id) { try { using (var db = new connectionsLinqDataContext()) { var temp = db.GetUserByUserId(id).ToList()[0]; var toReturn = ConvertToUser(temp); var decryptedpassword = PasswordSecurity.Decrypt("securityPassword", toReturn.password, false); toReturn.password = decryptedpassword; return(toReturn); } } catch (Exception) { return(null); } }