Database Reference
In-Depth Information
Figure 7-3. The Social Graph home page
Login Service
To check to see if the user values being passed through are connected to a valid user combination in the database, the
application uses the login method in UserService. As shown in the UserService code in Listing 7-21, the result of
the getByUsername method is assigned to the tempUser variable.
If the result is not null, the result is set on the User object of the GraphStory service object. Otherwise, a message
is added to the GraphStory error property and returned to the controller along with the original User object.
Listing 7-21. UserService Class with the login Method
public class UserService : UserInterface
{
private readonly IGraphClient _graphClient;
private User tempuser;
 
Search WWH ::




Custom Search