Comments (10)
Is this issue still relevant?
from linq2db.
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.
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.
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.
I think for Problems like this, we have the fluent mapping?
from linq2db.
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.
What would be the advantage of having two assemblies?
from linq2db.
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.
yes, but youonly don't need to use it.
i don't see any advantage in splitting up linq2db
from linq2db.
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)
- PostgreSQLBulkCopy performance degradation for method BulkCopyType.ProviderSpecific
- Method not found in target type: Microsoft.Data.Sqlite.SqliteConnection.ClearAllPools() HOT 4
- Linq2Db not all stored procedures scaffolding HOT 3
- Use custom property Getters in Linq queries HOT 5
- Remove `timestamp` "type" special handling in SQLite schema provider HOT 1
- [Association] with QueryExpressionMethod does not honor CanBeNull property HOT 3
- Connection pool depletion when using new DataContext(...), together with LoadWith and FirstOrDefault (or SingleOrDefault) HOT 6
- NotImplementedException when filtering on a sub-query HOT 9
- InheritanceMappingAttribute is working incorrectly when abstract class is present in inheritance tree HOT 5
- BulkCopy failure on CLOB HOT 1
- ConstantExpressions do not get parameterized in SQL statements HOT 1
- [QUESTION] Terminate a query by cancellation token HOT 5
- default-schemas not working
- Firebird different number datatype between constant or variable usage HOT 2
- Task-spawning code refactoring HOT 2
- WithOptions<T> looses CommandTimeout property
- Association property is null, while query is correct HOT 2
- Exception using Converter HOT 1
- Read some json values, Common Language Runtime detected an invalid program. HOT 5
- update documentation to show how to use fluent mapping
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linq2db.