Skip to content

Small peculiarities #212

@shuebner

Description

@shuebner

Disclaimer: I kind of feel bad for opening so many issues. I don't want to be annoying. My sole intention is to help improve this library because the "better" (whatever that means) this library is, the more it will help me with my project. I looked at other JSON API libraries and yours was by far the one appealing to me the most. Thus I am really getting into your library (great job btw!) and notice things of which I don't know if they are intentional, oversights or don't really matter.

IEntityRepository.UpdateAsync

  • is the entity parameter really necessary? All the attributes to be updated are in the IJsonApiContext anyway and DefaultEntityRepository does not use the parameter. Is there a use case for other IEntityRepository implementations that use this? Same question up the call chain for IEntityResourceService.UpdateAsync and maybe eventually BaseJsonApiController.PathAsync. Although I can imagine that having the entity in the controller might be useful.

ContextGraph

  • Entities and UsesDbContext are only set on initialization and could be set in a constructor instead of having public properties; only bool UsesDbContext {get;} is needed; this would convey the immutability of the two members and not expose more than is necessary

EntityResourceService

  • ApplyPageQueryAsync declares unused local variable query; the declaration seems not to have any side effects either

IQueryableExtensions

  • Last two comments in IQueryableExtensions.GetFilterExpressionLambda are wrong (copy-paste)
  • System.Reflection is declared but not used; this doesn't really matter but maybe gives the wrong impression of what the extensions do

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions