Inserting Data into a given Class

Is there a way that I can take the bones of the code below and make a method that will insert parameterised data into a given class?
Something like..

Public Sub saveSomething(className As String, insertData As Object())

                Public Sub saveWL(strWL As String, intOrder As Integer)
                Using dc = New Context(ConnectionString)
                Dim _WishListObj = New WishListClass With { _
                .WLText = strWL, .Order = intOrder}
                End Using
                End Sub

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
It could be possible by using Reflection ... but:
-it will slow down your process
-it won't result in compiled code (it will be interpreted at run time)
-is it really worth it?

What are you trying to achieve exactly?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
WatersideAuthor Commented:
I thought that might be the case.  I have a lot of entities that all need insert, Update and Delete routines.

I'm wondering if it might be simpler to create a routine that loops through the entities and their fields to create a text file that I can copy into my project?
Éric MoreauSenior .Net ConsultantCommented:
Other than Reflection, nothing comes to mind!
WatersideAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.