How to achieve generic Save and Update operation using generics and reflection in C#?
I have achieved data retrieve using some reference from here…
I don’t have much time to learn technologies like NHibernate/LINQ/Entity Frameowrk, etc. for this moment. I need a quick solution for this problem for some reason.
I think you’d be better of using an ORM — LINQ to SQL, LINQ to Entities, LINQ to nHibernate — rather than reinventing all of this. Essentially, what you are asking advice on doing has already been done for you in these frameworks/technologies. My advice is to spend some time learning about the tools that already exist and apply your creative energy to adding value to your application, using the already developed tools for the mundane work. Unless, of course, you’re looking to implement an ORM because the existing ones are inadequate for your needs. I suspect this isn’t the case, otherwise you’d already know how to use reflection to do what you’re asking.