DAL layer with strongly typed data - No dataset

A

Arne Vajhøj

Nully said:
Does someone know how to implement a dataaccess layer which returns
strongly typed data. Without using datatables and datasets?

Create your own domain classes and use an ORM framework.

Arne
 
S

sloan

I prefer custom business objects and custom collections.

However, if you want to go with a strong dataset, you and use the DAAB 2.0
(deprecated now) *or* the EnterpriseLibrary.Data and the ".LoadDataSet"
method.
(The DAAB might have called it the FillDataSet method, I don't remember
perfectly)

Here is a 1.1 version using the DAAB 2.0 (as I said, its deprecated).

http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!139.entry

I also have a 2.0 version of the above article that you can look at
EnterpriseLibary.Data examples.
http://sholliday.spaces.live.com/Blog/ (and search for Custom Objects and
Tiered Development II // 2.0)

In the first URL above, download the code. The code is downloadable.
The 2 methods to look for are:

public CustomerOrderInfoDS CustomersGetAllDS()
public CustomerOrderInfoDSNoConstraintsDS CustomersGetAllNoConstraintsDS()
 
S

sloan

I read your question wrong, I'm sorry.

Arne is correct.

Use my second URL to follow this idea:
"Create your own domain classes"

Check out NHibernate as (one example) of "use an ORM framework"

...........
 
M

Mr. Arnold

Nully Girl said:
Hi,

Does someone know how to implement a dataaccess layer which returns
strongly typed data. Without using datatables and datasets?

You use a strong type collection of objects with System.Collection
namespace.

http://www.dotnetspider.com/resources/1369-Use-Strong-Collection-Type-while-design-class-Des.aspx

Or you user System.Collection.Generic and use List<T> for strong typed
collections of objects.

http://en.csharp-online.net/Understanding_Generics—Type_Safety_and_Strongly_Typed_CollectionsFind out how to use DTO(s) which are talked about the the link, which canalso be applied to Business Objects too.http://msdn.microsoft.com/en-us/magazine/ee236638.aspx.

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4316 (20090807) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
B

Bjarte Skogøy

Hi,
Euss by Evaluant is an easy to use and learn ORM. http://euss.codeplex.com.

--
regards
Bjarte Skogøy



Nully Girl said:
Hi,

Does someone know how to implement a dataaccess layer which returns
strongly typed data. Without using datatables and datasets?

Microsoft technology people
http://www.hd720i.com

Pakistani mujra
http://www.saqib.biz

--
Njoy

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4321 (20090810) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4321 (20090810) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top