Click here to Skip to main content
15,920,468 members
Home / Discussions / C#
   

C#

 
QuestionTrouble Retrieving Coordinates Pin
123shailesh19-Mar-08 18:40
123shailesh19-Mar-08 18:40 
GeneralRe: Trouble Retrieving Coordinates Pin
Christian Graus19-Mar-08 23:18
protectorChristian Graus19-Mar-08 23:18 
GeneralCreat ascii font Pin
kamalesh574319-Mar-08 17:23
kamalesh574319-Mar-08 17:23 
GeneralRe: Creat ascii font Pin
Guffa19-Mar-08 23:05
Guffa19-Mar-08 23:05 
GeneralGeneric data fetch with IDataReader [modified] Pin
RubensFarias19-Mar-08 16:37
RubensFarias19-Mar-08 16:37 
GeneralRe: Generic data fetch with IDataReader Pin
mmikey719-Mar-08 22:16
mmikey719-Mar-08 22:16 
GeneralRe: Generic data fetch with IDataReader Pin
RubensFarias20-Mar-08 0:47
RubensFarias20-Mar-08 0:47 
GeneralRe: Generic data fetch with IDataReader Pin
mmikey720-Mar-08 5:34
mmikey720-Mar-08 5:34 
I would consider two things.
First would be performance of return (T)_dataReader.GetValue(i);, I don't know exactly how GetValue works internally but I think that it is a bit slower than type specific method like GetInt32 becase there is more type conversion stuff. Plus by using type specific Get method you would save one of your type conversion return (T)_dataReader.GetValue(i). Disadvantage is that you would have to use IF statement to determine which specific Get method to call.

Second thought is that I'm not sure if it is a best practice to have GenericDataReader to create businness objects. In my opinion objects like data readers should just get you a data and that is it. They should not be creating any business objects. Also I think that Business object should not work directly with data reader. It has lot of other work to do anyway. So I would suggest to create some BusinessDataObject that would take care of getting data from database, using GenericDataReader. And then any business object would just use relevant BusinessDataObject to load data.
GeneralRe: Generic data fetch with IDataReader Pin
RubensFarias23-Mar-08 12:50
RubensFarias23-Mar-08 12:50 
GeneralRe: Generic data fetch with IDataReader Pin
mmikey723-Mar-08 13:07
mmikey723-Mar-08 13:07 
GeneralSome issues with Socket class behavior. Pin
Jack04519-Mar-08 14:30
Jack04519-Mar-08 14:30 
GeneralRe: Some issues with Socket class behavior. Pin
XeoN-Kc19-Mar-08 21:35
XeoN-Kc19-Mar-08 21:35 
GeneralRe: Some issues with Socket class behavior. Pin
Jack04520-Mar-08 5:13
Jack04520-Mar-08 5:13 
GeneralLabel.Text property Pin
MarkB77719-Mar-08 12:23
MarkB77719-Mar-08 12:23 
GeneralRe: Label.Text property Pin
J$19-Mar-08 13:56
J$19-Mar-08 13:56 
GeneralRe: Label.Text property Pin
Luc Pattyn19-Mar-08 16:21
sitebuilderLuc Pattyn19-Mar-08 16:21 
GeneralRe: Label.Text property Pin
SeeSharp19-Mar-08 20:20
SeeSharp19-Mar-08 20:20 
GeneralRe: Label.Text property Pin
MarkB77719-Mar-08 20:36
MarkB77719-Mar-08 20:36 
QuestionUsing Certificates with c# and ASP.NET Pin
sfog19-Mar-08 11:00
sfog19-Mar-08 11:00 
GeneralCross post - please ignore Pin
pmarfleet19-Mar-08 11:15
pmarfleet19-Mar-08 11:15 
GeneralSound editing component Pin
Staffan Sjöstedt19-Mar-08 9:53
Staffan Sjöstedt19-Mar-08 9:53 
Generalvisual C# 2005 exiting Pin
xxmikexx19-Mar-08 7:42
xxmikexx19-Mar-08 7:42 
GeneralRe: visual C# 2005 exiting Pin
led mike19-Mar-08 7:49
led mike19-Mar-08 7:49 
GeneralRe: visual C# 2005 exiting Pin
xxmikexx19-Mar-08 7:52
xxmikexx19-Mar-08 7:52 
GeneralRe: visual C# 2005 exiting Pin
Not Active19-Mar-08 8:08
mentorNot Active19-Mar-08 8:08 

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.