We have a site table (SiteID, Alias, SiteName) that links to the user talbe (UserID, SiteID, UserName, Password). Site.Alias has a unique index.
The user logs in using Alias, UserName, Password. Currently, I return an EntityCollection filtered on Site.Alias. This returns 1 site which I then fetch the Users EntityCollecton from the SiteEntity filtering on UserName and Password. I then have to take the UserEntity and Attach the SiteEntity to it as the return value.
Is there a way to generate the following:
SELECT Fields FROM User JOIN Site ON SiteID WHERE SiteAlias="Alias" AND UserName="UserName" AND Password="Password"
Then fill the UserEntity and SiteEntity.
I know, I probably have missed this in the docs somewhere.