Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
AnswerRe: Unknown Error Message Pin
kubben23-Apr-07 5:41
kubben23-Apr-07 5:41 
AnswerRe: Unknown Error Message Pin
Jon Sagara23-Apr-07 6:35
Jon Sagara23-Apr-07 6:35 
AnswerRe: Unknown Error Message Pin
Vikram A Punathambekar23-Apr-07 6:59
Vikram A Punathambekar23-Apr-07 6:59 
GeneralRe: Unknown Error Message Pin
JMOdom23-Apr-07 7:58
JMOdom23-Apr-07 7:58 
QuestionHow to convert .gif file contains text only to .doc formate in asp.net Pin
attalurisubbu23-Apr-07 4:49
attalurisubbu23-Apr-07 4:49 
AnswerRe: How to convert .gif file contains text only to .doc formate in asp.net Pin
Dave Kreskowiak23-Apr-07 5:56
mveDave Kreskowiak23-Apr-07 5:56 
QuestionHow Making windows Fax Services to send multiple faxes. Pin
Eddymvp23-Apr-07 4:33
Eddymvp23-Apr-07 4:33 
QuestionTrying to understand the Factory Pattern Pin
martin_hughes23-Apr-07 4:29
martin_hughes23-Apr-07 4:29 
In my continuing, and seemingly endless, quest to understand design patterns and apply them to my code I've encountered the Factory Pattern - and I'm struggling to apply it to my current application, inspite of all the articles and literature on it. Can anyone help my edification?

In my tiered application I have a Business Layer consisting of Business Rules and Entities, and a Data Access Layer which takes care of the Database access.

The current design runs thusly - BLL calls function in DAL, which then queries the database and returns (or doesn't return dependent on the query results) a whole bunch of Entities (such as people, machines, models, sites etc etc) to the BLL.

It's the creation of the entities that's got me puzzled. In the DAL what I do to create them is to loop through a DataReader object and pass the DataReader into the Entity's constructor. This works fine, but I can see the limitations to this approach, not least in that the Entity in question has to know about the DataReader type.

What I'm really struggling with is how to inject the Factory Pattern into this scenario - each class in the DAL is responsible for getting different types of object, and as far as I can see they're kind of unrelated. Does this mean I need a different factory for each? Or can I just make one factory and pass it a value (or whatever) to tell it what type of objects I want created?

Any help appreciated! Big Grin | :-D
AnswerRe: Trying to understand the Factory Pattern Pin
Vikram A Punathambekar23-Apr-07 7:13
Vikram A Punathambekar23-Apr-07 7:13 
AnswerRe: Trying to understand the Factory Pattern Pin
Edmundisme23-Apr-07 11:00
Edmundisme23-Apr-07 11:00 
AnswerRe: Trying to understand the Factory Pattern Pin
martin_hughes10-May-07 8:41
martin_hughes10-May-07 8:41 
QuestionByte conversion fails Pin
AAKAra23-Apr-07 4:25
AAKAra23-Apr-07 4:25 
AnswerRe: Byte conversion fails Pin
Judah Gabriel Himango23-Apr-07 4:28
sponsorJudah Gabriel Himango23-Apr-07 4:28 
GeneralRe: Byte conversion fails Pin
AAKAra23-Apr-07 4:31
AAKAra23-Apr-07 4:31 
GeneralRe: Byte conversion fails Pin
Judah Gabriel Himango23-Apr-07 4:43
sponsorJudah Gabriel Himango23-Apr-07 4:43 
GeneralRe: Byte conversion fails Pin
AAKAra23-Apr-07 4:50
AAKAra23-Apr-07 4:50 
GeneralRe: Byte conversion fails Pin
AAKAra23-Apr-07 7:55
AAKAra23-Apr-07 7:55 
AnswerRe: Byte conversion fails Pin
Luc Pattyn23-Apr-07 8:29
sitebuilderLuc Pattyn23-Apr-07 8:29 
GeneralRe: Byte conversion fails [modified] Pin
AAKAra23-Apr-07 9:04
AAKAra23-Apr-07 9:04 
GeneralRe: Byte conversion fails Pin
Luc Pattyn23-Apr-07 9:37
sitebuilderLuc Pattyn23-Apr-07 9:37 
QuestionSelecting Row in GridView to show another GridView Pin
junisulaiman23-Apr-07 4:23
junisulaiman23-Apr-07 4:23 
AnswerRe: Selecting Row in GridView to show another GridView Pin
SABhatti23-Apr-07 5:36
SABhatti23-Apr-07 5:36 
GeneralRe: Selecting Row in GridView to show another GridView Pin
junisulaiman2-May-07 7:00
junisulaiman2-May-07 7:00 
GeneralRe: Selecting Row in GridView to show another GridView Pin
SABhatti2-May-07 13:16
SABhatti2-May-07 13:16 
QuestionDigital Persona 4000B Finer Reader Pin
| Muhammad Waqas Butt |23-Apr-07 3:49
professional| Muhammad Waqas Butt |23-Apr-07 3:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.