Resolved How can I create an ORM system using Reflection and Ado.net?

Eakub Islam

New member
Joined
Feb 3, 2024
Messages
1
Programming Experience
1-3
Create a console application to develop the following feature.
Create a Class named MyORM<G, T> which will have 5 methods. This class should be non-static.. Following methods should be non-static as well.
  1. Insert(T item)
  2. Update(T item)
  3. Delete (T item)
  4. Delete (G id)
  5. GetById(G id)
  6. GetAll()
T should be a class that always has an id of type G. You can make an abstract base class or interface to enforce this in generic constraint.
Your ORM should handle nested objects. List of objects and primitive types as well. Nesting will happen on multiple levels so you have to use recursion.
Nested delete operation should not use the Cascade feature, rather you should delete recursively. You can use the following classes to test. But make sure that your ORM works for other classes as well, if the tables are present in the database.
Use reflection and Ado.net to create this mini ORM system.
 
Copying and pasting the text of your homework assignment and then waiting for us to do it for you is not the way to get help. If you want to make an effort and then ask for help with the actual issues you encounter along the way, you'll find plenty of people willing to help you solve those problems. If you just want to take advantage and have us cheat for you, you'll generally be rather disappointed.
 

Latest posts

Back
Top Bottom