Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alter ActiveRecord.tt to use Any() instead of Count() > 0 #61

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Alter ActiveRecord.tt to use Any() instead of Count() > 0 #61

wants to merge 3 commits into from

Conversation

jarrettmeyer
Copy link
Collaborator

.Count() > 0 will enumerate the entire collection to determine count,
then test that count > 0. .Any() will return true as soon as the first
record is found.

.Count() > 0 will enumerate the entire collection to determine count,
then test that count > 0. .Any() will return true as soon as the first
record is found.
Added VS2010 SLN file. Updates to t4 templates to differentiate between
foreign key types. The foreign key reference builder now recognizes
parent-child relationship of foreign keys. This includes a change to the
SQL line to fetch the foreign keys from the database and how the results
of that stored procedure are processed.

class Customer
{
  IQueryable<Order> Orders { get; }
}
class Order
{
  Customer Customer { get; } // <- this is now singular!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant