Object–relational mapping: Difference between revisions

Content deleted Content added
No edit summary
Line 30:
</syntaxhighlight>
 
In contrast, the following makes use of an ORM-job API, allowingwhich themakes writingit ofpossible to write code whichthat naturally makes use of the features of the language.
 
<syntaxhighlight lang="csharp">
Line 37:
</syntaxhighlight>
 
The case above makes use of an object representing the storage repository and methods of that object. Other frameworks might provide code as static methods, as in the example below, and yet other methods may not implement an object-oriented system at all. Often the choice of paradigm is made tofor the best fit of the ORM best into the surrounding language's design principles.
 
<syntaxhighlight lang="csharp">
Line 43:
</syntaxhighlight>
 
Usually, the framework will expose some filtering and querying functionality, allowingfor accessing and modifying subsets of the storage base to be accessed and modified. The code below queries for people in the database whose ID value is '10'.
 
<syntaxhighlight lang="csharp">