You need to ensure that the database script that is created by using the Generate Database From Model option meets the requirements

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application.
You use the Entity Framework Designer to create an Entity Data Model using model-first
development. The database has the following requirements:
• Each table must have a datetime column named time_modified.
• Each table requires a trigger that updates the value of the time_modified column when a
row is inserted or updated.
You need to ensure that the database script that is created by using the Generate Database From
Model option meets the requirements. What should you do?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application.
You use the Entity Framework Designer to create an Entity Data Model using model-first
development. The database has the following requirements:
• Each table must have a datetime column named time_modified.
• Each table requires a trigger that updates the value of the time_modified column when a
row is inserted or updated.
You need to ensure that the database script that is created by using the Generate Database From
Model option meets the requirements. What should you do?

A.
Create a new T4 Template, and set the DDL Generation template to the name of the new
template.

B.
Create a new Windows Workflow Foundation workflow, and set Database Generation Workflow
to the name of the new workflow.

C.
Add a DateTime property named time_modified to each entity in the model, and set the property
s StoreGeneratedPattern to Computed.

D.
Add a new entity named time_modified to the model, and modify each existing entity so that it
inherits from the new entity.

Explanation:
Model-First in the Entity Framework 4
(http://msdn.microsoft.com/en-us/data/ff830362)



Leave a Reply 0

Your email address will not be published. Required fields are marked *