Updating datbase

Posted by / 06-Sep-2020 07:02

Try out following example to understand update operation.

You need to provide an employee ID to update an employee salary.

The changed value should be updated in databse is there any posbility to do that.

To update a record in any table it is required to locate that record by using a conditional clause.

Below example uses primary key to match a record in employee table.

If omitted, the specified project’s configuration file is used.

Specifies the project which contains the Db Context class to use.

updating datbase-79updating datbase-59updating datbase-73

If the target database was created by an initializer, an initial migration will be created (unless automatic migrations are enabled via the Enable Automatic Migrations parameter). If omitted, migrations will attempt to locate a single context type in the target project.