473,382 Members | 1,247 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Data Access "Architecture" question

Hi I'm creating a data access layer in which each object maps onto a
database table. I will also be creating basic methods that return the object
by primaryid and perform insert and update operations. I also will be
creating methods which return collections of the object. Where should I put
those methods that return collections of objects. Should I create a
Collections class that corresponds with each object which just returns
collections.

Bear in mind I am using CodeSmith and so would like a consistant place to
put the main object with it's properties and so forth and the methods that
will return collections.

Regards, Chris.
Sep 2 '08 #1
1 932

I prefer to put these methods inside a Manager or Controller class.

CustomerManager (or CustomerController)
.Add
.GetSingleCustomerWithOrders
.GetSingleCustomer
GetAllCustomers
You can find a downloadable example here:
http://sholliday.spaces.live.com/blog/cns!A68482B9628A842A!176.entry
or find the "Custom Business Object" Version 2 blog entry at the same site.


"Fresno Bob" <no****@nospam.comwrote in message
news:O9**************@TK2MSFTNGP06.phx.gbl...
Hi I'm creating a data access layer in which each object maps onto a
database table. I will also be creating basic methods that return the
object by primaryid and perform insert and update operations. I also will
be creating methods which return collections of the object. Where should I
put those methods that return collections of objects. Should I create a
Collections class that corresponds with each object which just returns
collections.

Bear in mind I am using CodeSmith and so would like a consistant place to
put the main object with it's properties and so forth and the methods that
will return collections.

Regards, Chris.

Sep 4 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: CJM | last post by:
I have a potential client who has a Access-based DB which they use for recording orders, customer details etc... They want to provide some of this information online, eg. customer account...
2
by: Joshua Belden | last post by:
Small architecture question I'm hoping someone can answer? I want to create a Windows Service Component that will periodically poll a database for data changes, respond to several client...
6
by: Tim | last post by:
Hello everyone. I visit this board pretty regularly but have never posted. My question is an application architecture question... so hopefully it's okay to post in the dotnet general forum. I...
2
by: hans | last post by:
Hi! I am new to .NET (coming from Java). We have to implement a desktop application which extracts data from a database, does some analysis, filtering etc. and displays the results. I have...
1
by: Daren Hawes | last post by:
Hi, I have a architecture question. How would one structure an application along with a Pocket PC 2003 component that work together to collect survey data. My query is around the Sync and...
2
by: John A | last post by:
I have a Web Service that I am reponsible for that we use for data integration purposes. Recently I have been tasked with sending some of this data to a third party. Because they need to receive...
5
by: Tina | last post by:
I'm reading about the "3-tier" design afforded by using Object Data Sources in the App_Data folder in 2.0 asp.net projects. To me, putting an object data source in a separate folder on the web...
2
by: Ken Ross | last post by:
I'm in the early stages of working up the design for a large .Net web application and want to make sure that we have the best possible physical architecture to support the logical architecture and...
9
by: Mike Hofer | last post by:
In a large application I'm working on (ASP.NET 1.1, VS2003), we have a base class that wraps stored procedures. Essentially, this base class (StoredProcedureBase) encapsulates the code to set up...
1
by: Fresno Bob | last post by:
Hi I'm creating a data access layer in which each object maps onto a database table. I will also be creating basic methods that return the object by primaryid and perform insert and update...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.