First, I would like to thank you about your feedback. Straight to your questions:
You have correctly observed that the types described in the topic are slightly different than the real ones. The Edit Table dialog was changed and we did not have enough time to update the documentation for the Q3 release. But as you guessed, the equivalent types are available. We will update the snapshots and the information for the next release.
Yes you are right, some parts of the topic are inconsistent. By default if you follow the steps described in the tutorial, the name of the generated context will be the same as the connection string name. In this example, as you said it will be "MyDatabaseDbConnection". However you could easily change the name of the already generated context. For that purpose, in the Visual Designer, right-click on an empty area and select "Show Model Settings...". In the Model Settings tab page (the first tab page in the dialog), there is only one setting named "Model Name", this is the name of the context. Once you change it, click Ok and Save the model. That should be enough to change the name of the context.
About the next question, I completed the tutorial step-by-step and executed exactly the same code as the one listed in the topic. Everything should work correctly. Three records should be added in the database - one in the Region table, one in the Student table and one in the StudentsRegions join table.
About the last scenario. Suppose you have already inserted region record(s) in the database. In order to add a new student to an existing region, first you have to load the target region from the database. For that purpose you have to write a linq query against the context. Next, you have to assign the region to the new student, by using the student.Regions collection. Finally, pass the student to the context by invoking the dbContext.Add method and save the changes. Here is a sample code demonstrating how to do that:
MyDatabaseDbContext dbContext =
Region region = (from r
where r.Name == "USA"
Student student =
Please see this topic, it should give you basic information about how to work with data in OpenAccess ORM: http://www.telerik.com/help/openaccess-orm/getting-started-root-working-data.html
For more information about writing linq queries and loading data from the database, please refer to the following sections in the help documentation:
Please if you have further questions or need more assistance, do not hesitate to contact us.
the Telerik team
See What's New in Telerik OpenAccess ORM in Q3 2010!
Monday, November 15, 11 am Eastern Time: Register here>>
Monday, November 15, 10 pm Eastern Time: Register here>>