Skip to content

Feature/#162 #262

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

Merged
merged 3 commits into from
Apr 23, 2018
Merged

Feature/#162 #262

merged 3 commits into from
Apr 23, 2018

Conversation

crfloyd
Copy link
Contributor

@crfloyd crfloyd commented Apr 20, 2018

Closes #162

FEATURE

crfloyd added 2 commits April 19, 2018 22:56
…ceAttribute. Updates DefaultEntityRepository to check this value when including relationship entities and to throw if set to false.
Copy link
Contributor

@jaredcnance jaredcnance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for doing this. Only one minor comment and we're good to go.

@@ -20,6 +20,9 @@ public class Person : Identifiable, IHasMeta

[HasMany("todo-collections")]
public virtual List<TodoItemCollection> TodoItemCollections { get; set; }

[HasOne("unincludeable-item", Link.All, false)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to include the canInclude parameter name?

[HasOne("unincludeable-item", Link.All, canInclude : false)]

These examples serve as documentation, so being explicit improves readability.

@@ -26,8 +28,7 @@ public override string ToString()

public override bool Equals(object obj)
{
var attr = obj as RelationshipAttribute;
if (attr == null)
if (!(obj is RelationshipAttribute attr))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jaredcnance jaredcnance merged commit 08e2945 into json-api-dotnet:master Apr 23, 2018
jaredcnance added a commit that referenced this pull request Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants