Archives
-
WPF for the Visual Basic Programmer (Pluralsight)
Hello All,
-
Pluralsight Class on Best Practices for Requirements Gathering
Hello All,
-
Two more courses on Pluralsight
Hello All,
-
Create a Login Window in WPF (2013)
One of my most widely-read blog posts had to do with creating a Login Windows in WPF that I wrote several years ago. I thought I would revisit this login screen with an updated version in Visual Studio 2012 and with an updated look and feel.
-
My First Course on Pluralsight
So, my first course went live on Pluralsight today! Entitled "The Many Approaches to XML Processing in .NET Applications" this ~4 hour long video course covers the following topics: - What is this XML Thing Anyway? - A Myriad of Methods to Read XML - 16 Ways to Write XML Documents - Read World Uses of XML - LINQ to XML Step-by-Step - Use XML: An Alternative to SQL If you have ever wanted to work more with XML, then learning LINQ to XML is a great way to do so. This video course will take you step-by-step on the best ways to read and write XML documents. You can check out this course at http://pluralsight.com/training/Courses/TableOfContents/xml-processing-approaches-dotnet-applications Enjoy!
-
Creating Collections of Entity Objects using Reflection
In my last blog posts I have been showing you how to create collection of entity objects using code that is custom for each table and object you create. Well, if you use a little reflection code you can shrink this code quite a bit. Yes, we all know that reflection is slow and probably should be avoided in most cases. What I have found out is that loading over 6200 product records into an entity collection still takes less than a second when using Reflection. So, I will leave it up to you to decide which way you wish to go.
-
Join PDSA at DevIntersection Conference - April 8 - 11, 2013
Use the Code 'PDSA' when registering and receive $50 off your registration!
-
Creating Collections of Entity Objects using LINQ and Field Method
Let’s now look at another advantage of using a DataTable. A lot of developers today are used to using LINQ. After loading data into a DataTable you can iterate using a foreach statement, or you can use LINQ to create a collection of entity objects. The DataRow class has an extension method called Field that allows you to check the data and return either a null or the real data value. Of course this means you have to use Nullable types for your properties in your class. Below is the definition of a Product class that uses all Nullable types.
-
Creating Collections of Entity Objects using LINQ
As discussed in my last two blog posts you have a variety of ways to create collections of Entity classes. Using a DataSet or DataTable is a little slower than using a DataReader, but in most cases the difference is in milliseconds so in a real world app this difference would not be a killer. For instance, in my sample data I was loading 6,261 records from the Product table discussed in the last blog post and it took 45 milliseconds on average to load those records into an entity collection using a DataTable. It took only 30 milliseconds on average to load the same entity collection using a DataReader. The rendering of that data would probably take longer than that, so you can choose which one you wish to use.
-
Building Collections of Entity Classes using a DataReader
As discussed in the last blog post, it is a best practice to build entity classes. In the last post we filled a DataTable with Category data and then iterated over that DataTable to create a collection of Entity classes. In this blog post we will use a SqlDataReader to fill the Entity classes.
-
Building Collections of Entity Classes
What is an Entity Class
Past Blog Content
Blog Archive
-
2015
-
2014 (18)
-
2013 (11)
-
2012 (19)
-
2011 (29)
-
2010 (19)
-
2009 (28)
-
2008 (0)
-
2007 (14)
-
2006 (6)