public User Login(User user) { IUserComponent component = new UserComponent(); bool result = false; try { result = component.Login(user); } catch (Exception e) { throw new FaultException(e.Message); } if (result) { return component.GetRecord(user.LoginID); } else { return null; } }