Skip to content

How to use it with n-tier architecture #263

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

Closed
bugproof opened this issue Apr 20, 2018 · 2 comments
Closed

How to use it with n-tier architecture #263

bugproof opened this issue Apr 20, 2018 · 2 comments
Labels

Comments

@bugproof
Copy link

bugproof commented Apr 20, 2018

Is there some way to decouple my application when using JADNC? Lets say I have Data project where I store all my entities, and because I need to derive from Identifiable I have to add reference to it there (coupling it with ASP.Net Core)

@jaredcnance
Copy link
Contributor

Currently, your base "Data" project would be the one to take on JsonApiDotNetCore as a dependency and then all other projects will get it as a transitive dependency. Our roadmap includes a separatuon of concerns where the current package will be split into a few packages:

  1. JsonApiDotNetCore.Abstractions
  2. JsonApiDotNetCore.Serialization → JsonApiDotNetCore.Abstractions
  3. JsonApiDotNetCore → JsonApiDotNetCore.Serialization
  4. JsonApiDotNetCore.EntityFramework / MongoDb / ... → JsonApiDotNetCore

JsonApiDotNetCore.Abstractions would contain all the base model definitions and would be depended upon by the other packages. So, consumers would not be required to take this on as an explicit dependency, but it would allow users like yourself to produce artifacts that depend on specific JsonApiDotNetCore types (such as Identifiable) without bringing in AspNetCore and EntityFrameworkCore.

However, at the current time this is not possible. Please let me know if this does not answer your question.

@bugproof
Copy link
Author

Thanks, that's nice to hear you're planning to decouple it. It's a nice project :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants