Hello!
Can somebody explain what custom object means which is mentioned in the text
below.
The alternative to using DataSets is to create custom object types that
represent your business entities, and custom collection types to contain
them. When you go this route, you end up needing to write a lot more code
yourself. This has gotten a lot better in Visual Studio 2005 and .NET 2.0
with the additions of code snippets and generic collection classes. But to
support the full range of features that a DataSet provides, there is still a
fair amount of custom code that you will need to write by hand.
//Tony
Marc Gravell - 24 Oct 2007 11:20 GMT
public class Customer {
public int Number {...}
public string Name {...}
...etc...
}
Note that the entity approach is well suited to ORM tools like LINQ
and NHibernate, and makes it easier to expose the entities as fully-
defined types for web-services etc. DataSet uses an adapter pattern;
advantages to both. Personally I prefer an entity approach as it feels
a lot more object oriented. And I'm a control freak.
Marc
Göran Andersson - 24 Oct 2007 14:00 GMT
> Hello!
>
[quoted text clipped - 8 lines]
> support the full range of features that a DataSet provides, there is still a
> fair amount of custom code that you will need to write by hand.
The custom object type would be a class that represents a record in the
data table, and has properties that correspond to the fields in the
table. The custom object would contain the same data as a DataRow does
in the DataSet.

Signature
Göran Andersson
_____
http://www.guffa.com
sloan - 24 Oct 2007 18:36 GMT
Here is a blog entry, with downloadable code:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!140.entry
I have a 1.1 version of this article as well, which I would look at too.
I have a comparison between strong datasets and custom objects... and you
might be surprised by the time it takes to load them.
See 1.1 example for more info.
PS
These days, I go ahead and define a collection object like this
public class OrderCollection : List<BusinessObjects.Order>
{
//yeah, that's all there is to it.
}
You'll know what I"m talking about if you download and go through the code.
> Hello!
>
[quoted text clipped - 12 lines]
>
> //Tony
sloan - 26 Oct 2007 18:45 GMT
This article will explain it all.
http://msdn2.microsoft.com/en-us/library/ms978496.aspx
What they are, and contrast to other methods.
> Hello!
>
[quoted text clipped - 12 lines]
>
> //Tony