Click here to Skip to main content
16,006,378 members

Comments by vishalharne (Top 5 by date)

vishalharne 24-Aug-15 6:29am View    
yeah that could be the only option left I guess.. I will try to find some more options.. the only pain is if there are 80 tables I have to write 80 statements
thanks Andy ...
vishalharne 24-Aug-15 6:09am View    
Thanks Andy for the quick response. This looks great, but what i really want is -

List
addresses = Factory< workers.address >.SelectAll< address > ();
Customer customer = Factory<workers.customer>.SelectById<customer>(id);

In the above code, can we remove the tight coupling of Factory<workers.address> ?
can we somehow manage to implement Factory < generictype > ??
factory < something which can be resolved at run time > ??


I tried this..but it doesn't takes an type of 'Type', so becomes difficult.

Let me know if you got me. appreciate your help ^_^

Vishal
vishalharne 24-Aug-15 5:39am View    
Okay Will search if I can get something.. if not I will try ADO .net
vishalharne 24-Aug-15 5:21am View    
Thanks F-Es ,
appreciate your concern here, but this requirement is something like I have to read data one table on request and there are such 80 tables, so I didn't wanted to repeat that code instead I was thinking i anything generic could be a used.
vishalharne 24-Aug-15 5:19am View    
Hi Andy,

Thanks for your reply. What I am trying to achieve is read data at run time from various tables. so i don't want to write the same code repeatedly with one change and that is table name.Instead if I could write just one method and a table name string passed to it, and then using reflection if I could read through context... I am not sure if it could be done . sorry if I am not clear at explaining