public void Include(string entity, string role) { var ex = Includes.Find(i => i.Entity.Equals(entity, StringComparison.InvariantCultureIgnoreCase) && i.Role.Equals(role, StringComparison.InvariantCultureIgnoreCase)); if (ex == null) { Includes.Add(new EntityQueryInclude(role, entity)); } }
public bool HasInclude(string entity, string role) { return(Includes.Find(i => i.Entity.Equals(entity, StringComparison.InvariantCultureIgnoreCase) && i.Role.Equals(role, StringComparison.InvariantCultureIgnoreCase)) != null); }