Posts Tagged ‘ADO.NET’

It has been a month or two  that Entity Framework CTP 4.0 bits have released.I had read through the feature list back then but could not manage time to take a detailed look until this weekend.I always felt that Entity Framework’s approach towards handling of configuration(object relational mappings) and plain .NET objects was bit restrictive and cumbersome respectively.The mappings are needed to be stored in Entity Data Model(.edmx) files which are nothing but xml files with object to relational store mapping information.There was no proper way to express this mapping through code or attributes.But with code first approach we will able to describe our model using plain .NET objects and map it to the database objects through .NET code.In this post we will discuss the very basic steps involved in doing so.

(more…)

ADO.NET Entity Framework is the Object Relational Mapping(ORM) framework from Microsoft which enables us to map .NET classes to objects(tables,views,stored procedures..etc) in a relational database.While studying any ORM framework it’s important to know about, how it handles concurrency and ensures data consistency.In this post we will look into what options ADO.NET Entity Framework provides for ensuring this consistency.

(more…)

In my last post we have discussed about how to explicitly load data into related objects using EntityReference class.However in .NET Framework 4.0 there is another new way to explicitly load data into related objects using the LoadProperty method of the System.Data.Objects.ObjectContext as shown below:

(more…)

In any Object Relational Mapping (ORM) framework the client code interacts with the objects.The framework maps the same to relational database tables and manages database connection and all the SQL queries.So in this context it is extremely important to understand what are the various mechanisms using which data can be loaded into the objects.In this series of posts we will discuss on how ADO.NET Entity Framework does the same.To start with we will discuss about how the objects are explicitly populated with data.

(more…)