Ask Your Question

Revision history [back]

The process for generating an object model using dot net from a database involves following these steps:

  1. Open Visual Studio and create a new project.

  2. Add a new item to the project, and select "ADO.NET Entity Data Model" from the list of options.

  3. Choose "EF Designer from Database" and click "Next".

  4. Choose the database connection you want to use, and click "Next".

  5. Select the database objects you want to include in the model, and click "Finish".

  6. If you encounter an error citing an invalid object name of 'MyData', it means that the database object you are trying to include in the model does not exist.

  7. To resolve this error, you need to check the spelling of the object name and ensure that it exists in the database.

  8. Once you have resolved the error, regenerate the object model using the steps above.

  9. The object model should now be generated successfully, and you can start using it in your application.