EDN Admin
Well-known member
What is the best method for converting object for a mssql insert/update. Basically, I have an XML doc mapped to an object. The field names are pretty much the same, anything else I used attributes to mod. Currently, I am using reflection to generate sql
statements. I am pretty new to C# (coming from php), I know there has got to be other ways. I was looking into Linq, but disregarded it as this is a long term projec and concerned for its future. Also looked at Entity, but not enough exp.
Using reflection, seems like a performance hit, if I have to iterate over every parameter and match to the sql columns for the insert. Is there a better way? Something that takes an object and converts it to something sql can use?
Sql data adapter? Linq (really do not want to use linq though)
The size of the data is fairly hefty, from 20-50 fields in the XML Object and anywhere from 100-3000 rows. This would be repeated nightly say, 20-50 times. So there is some performance concerns.
The next problem is that some of these XML documents are multilevel.
View the full article
statements. I am pretty new to C# (coming from php), I know there has got to be other ways. I was looking into Linq, but disregarded it as this is a long term projec and concerned for its future. Also looked at Entity, but not enough exp.
Using reflection, seems like a performance hit, if I have to iterate over every parameter and match to the sql columns for the insert. Is there a better way? Something that takes an object and converts it to something sql can use?
Sql data adapter? Linq (really do not want to use linq though)
The size of the data is fairly hefty, from 20-50 fields in the XML Object and anywhere from 100-3000 rows. This would be repeated nightly say, 20-50 times. So there is some performance concerns.
The next problem is that some of these XML documents are multilevel.
View the full article