When you are working with “DbDataReader”, you are connected with a database and working directly with it. In some cases, it might not be a good idea. Another approach can be (1) load data from DB, (2) working with data for a while, (3) commit all changes back to DB at one time. ADO.NET provides another set of classes for the disconnected approach. Continue reading
DB Access is all about the recent business applications. DB is regarded as a must component. EF (Entity Framework) and LINQ might be the choice of developers nowadays.
But the basics are the basics. Old ADO.NET classes are still used out there in legacy applications. Also learning old ADO.NET classes are really helpful to understand how applications interact with DB. When you work with EF, you are working with Model objects and the most of the DB interactions are encapsulated and hidden from you. It is a good thing in most cases, but I recommend you to learn at least how ADO.NET works directly with DB. Continue reading
The “ADO.NET Entity Data Model” wizard lets you create conceptual models from physical storages in no time. As a developer, you are more interested in the classes you’re working with. The wizard creates 2 files: edmx and .cs or .vb. The source code is automatically created and you are not supposed to modify it. In it, the classes are defined as partial classes. If you want to add a custom code, you need to create another file and provide a partial class implementation. Continue reading
When you add a new item “ADO.NET Entity Data Model“, VS2010 adds 2 files into your project: “.edmx” and “.Designer.cs“. The “edmx” file is an XML file, which contains the storage schema, the conceptual schema, and the mapping between them. The “Designer.cs” has the partial Entity classes you are going to work with. The main focus of this post is the edmx file. Continue reading