Building better business objects with Entity Framework
Topic
The best way to design the business objects
Discussion
An ideal environment for creation of business applications should allow developers to describe the business logic and state of the problem domain which they are modeling with minimum or no “noise” coming from the underlying representation and the infrastructure that supports it.
- What are the underlying representations?
- Relational Databases
- XML/SOAP/JSON
- What libraries and tools can be used to reduce the “noise” coming
from these representations?
- LINQ
- ADO.NET Entity Framework
- Object-Relational Mappers
- What is LINQ?
The Language-INtegrated Query feature of .NET provides general-purpose query facilities for the .NET runtime, for use with many types of data, including XML, Relational Databases, as well as native data types (Collections, Sets, Arrays, etc…)
Using LINQ, programmers are not forced to switch into the languages of the underlying representations (SQL, XPath, etc), and then build layers of glue code to bring those representations back into the .NET runtime.
LINQ & EF example
Sources
Entity Framework, LINQ and Model-First for the Oracle Database
Avoid the LINQ to SQL Data Objects vs. Business Objects Debate