# Updating a Scaffolded DbContext Class

Source: https://help.codestencil.com/examples/updating-a-scaffolded-dbcontext-class

It is possible that the DbContext class created when Entity Framework scaffolded your database ( See Import) is missing some namespaces, has the wrong namespace, or lacks a particular type of constructor.

In this next scenario, the EF Scaffolder generated the DbContext Class - *MyProjectContext.cs* with the same namespace for the model classes.

![](https://cdn.eniston.com/bases/5691f589-9697-4a3a-b3a1-f6588fa2e596/attachments/mceclip1_1713644731.png)

However, the DbContext class is supposed to be located elsewhere, which automatically requires it to have a different namespace, which will be MyProject.Data. Hence, we will need to configure CodeStencil to replace this namespace so that we have the result shown below:

![](https://cdn.eniston.com/bases/5691f589-9697-4a3a-b3a1-f6588fa2e596/attachments/mceclip0_1713649356.png)
