Creating Collections of Entity Classes
You should be creating collections of objects instead of using a Data Reader, a DataSet or a DataTable in your applications. The reasons for using collections of objects are many. You get strong typing, IntelliSense, compile-time errors instead of runtime and many other reasons. You can use LINQ to SQL or the Entity Framework to generate code that creates these collections of objects for you. However, Microsoft loves to abandon technologies every other year, so if you know how to build your own object collections using technology that is tried and true, then you are not relying on Microsoft staying consistent. Using ADO.NET for data access and building classes with properties and methods has not changed since .NET 1.0. In this seminar you will learn to use a DataTable to fill a collection of objects. You will then see how to use a DataReader to fill the same collection of objects. You will also see how to use LINQ to iterate over a DataTable to build your entity collection. Finally, you will learn the use of nullable and non-nullable data types and finally see how to use reflection to fill your collections.