RaceEntity r = new RaceEntity();
RaceCollection races = new RaceCollection();
IPredicateExpression filter = new PredicateExpression(RaceFields.Deleted == false);
filter.AddWithAnd(RaceFields.Date >= raceDate);
filter.AddWithAnd(RaceFields.Date <= raceDateTo);
//if (Li2Principal.GetCurrentPrincipal().RaceAdmin)
//{
// filter.AddWithAnd(HOW DO I GET THE RIGHT CRITERIA HERE == Li2Principal.GetCurrentPrincipal().AccountGuid);
//}
races.GetMulti(filter, 0, new SortExpression(RaceFields.Date | SortOperator.Descending));
rptRaces.DataSource = races;
rptRaces.DataBind();
Hi, I am new to this product, I have got some of the basics down pretty well. But, I can't figure out how to add this criteria to my "where" clause
My I have three tables
Races, RaceAdmin, Account
Race Admin has a Race.RaceGUID and an Account.AccountGUID relationship. So, what I want to do above is if the authenticated user is a RaceAdmin, I want to pull back only those races in the race table that the user is a RaceAdiin for. Any thoughts on how I can accomplish this? As this is such a common scenario, I would assume its simple, but I can't figure it out. Thanks for being willing to take a look!