Giter Site home page Giter Site logo

Comments (10)

igor-tkachev avatar igor-tkachev commented on April 28, 2024

Is this issue still relevant?

from linq2db.

gkathire avatar gkathire commented on April 28, 2024

I think this is still an issue, currently i'm adding linq2db assembly in non-dal layer projects which has the poco associated with the db. It would be nice if you can put the annotation classes in a separate assembly or provide a mechanism to dynamically create the table<->poco relationship (like Entity Framework's OnModelCreating hook).

from linq2db.

igor-tkachev avatar igor-tkachev commented on April 28, 2024

Well, what namespaces you want to see in this assembly. Or what namespaces you do not want to see. And the most difficult question is what is the assembly name :)

from linq2db.

gkathire avatar gkathire commented on April 28, 2024

How about something like Linq2DB.Common or Linq2DB.Shared as the assembly name and the namespace ?. The annotations can reside in Linq2DB.Common(/Shared).Annotations and other generic utilities can be in Linq2DB.Common(/Shared).Utilities and so forth.

from linq2db.

jogibear9988 avatar jogibear9988 commented on April 28, 2024

I think for Problems like this, we have the fluent mapping?

from linq2db.

ili avatar ili commented on April 28, 2024

It is the way... But if we do have 100 POCOs i think fluent mapping would be heavy thing, also using T4 templates is a pretty feature :)

from linq2db.

jogibear9988 avatar jogibear9988 commented on April 28, 2024

What would be the advantage of having two assemblies?

from linq2db.

gkathire avatar gkathire commented on April 28, 2024

Most of the time in big projects, we tend to put the interfaces and pocos associated with the tables in a separate project, in that case we dont want the database access code to be included in that project.

from linq2db.

jogibear9988 avatar jogibear9988 commented on April 28, 2024

yes, but youonly don't need to use it.
i don't see any advantage in splitting up linq2db

from linq2db.

MaceWindu avatar MaceWindu commented on April 28, 2024

We don't have any plans to split linq2db into several assemblies, at least in this way.
You can easily achieve something like that with custom annotation classes (or whatever metadata source you like) and your IMetadataReader implementation to work with them. Btw I already use this approach for enums sharing with non-db assemblies in our project. Just two halfpage-size classes: for attribute and reader.

I will close it for now.

from linq2db.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.