I am building a lightswitch application. I have my DataSource (sspData > which has all my tables) and my screens. Now I am trying to set a global variable in my Application as shown below. However I can't just query the tables just like:
this.aspnet_Users.Where(a => (a.UserName == uName)).SingleOrDefault();
How do I get "access" to query the table from within my application code?
public partial class Application
{
private string estateName()
{
string esName = "";
string uName = this.User.Identity.Name;
try
{
**var qryUser = this.aspnet_Users.Where(a => (a.UserName == uName)).SingleOrDefault();**
esName = qryUser.PayGroup;
}
catch (Exception e)
{
Debug.WriteLine(e.InnerException.ToString());
}
return esName;
}
}