Updating entity framework conceptual model

Starting with the Entity Framework 4.1 you can also create a model programmatically using Code First development.There are two different scenarios for Code First development.If the corresponding types are part of an inheritance hierarchy, only the entity type that is closest to the root of the hierarchy and that is mapped to the affected table is updated with matching properties.

updating entity framework conceptual model-71

This has the same effect on the conceptual model as deleting the stored procedure with the old name and adding the stored procedure with the new name.

A new Function Import must be created for the renamed stored procedure or the original Function Import must be remapped to the renamed stored procedure.

If an existing column is added to the primary key and was previously mapped to an association (rather than to an entity property), a corresponding new entity property will be created.

The corresponding entities are updated with matching properties and mappings.

No changes are made to the conceptual model or mappings.

The model might have to be updated manually if the column type is changed so that the corresponding entity property type is incompatible.

You can also manually create the model and mapping content.

For more information, see EDM Generator (Edm Gen.exe).

NET data providers by providing an Entity Connection to an underlying data provider and data source. NET Entity Data Model Tools generate a class derived from Object Context that represents the entity container defined in the conceptual model.

When a query is executed, it is parsed and converted into a canonical command tree, which is an object model representation of the query. The Object Context class supports queries against a conceptual model that return entities as objects, as well as creating, updating, and deleting entity objects.

Renaming a column has the same effect on the conceptual model as deleting the column with the old name and adding a column with the new name.

Tags: , ,