Skip to content

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.

[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.

{
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