Skip to content

Commit

Permalink
added documentation paragraph.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam committed Jul 9, 2018
1 parent 3a4c675 commit 08e00f1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ title: Entity Framework 6
Npgsql has an Entity Framework 6 provider. You can use it by installing the
[EntityFramework6.Npgsql](https://www.nuget.org/packages/EntityFramework6.Npgsql/) nuget.

## Basic Usage ##
Create an inheritor if DbConfiguration in the same assembly as your entity framework DbContext. Ensure that you configure provider services, a provider factory, a default connection factory as shown below:

```
class NpgSqlConfiguration : DbConfiguration
{
public NpgSqlConfiguration()
{
SetProviderFactory("Npgsql", NpgsqlFactory.Instance);
SetProviderServices("Npgsql", provider: NpgsqlServices.Instance);
SetDefaultConnectionFactory(new NpgsqlConnectionFactory());
}
}
```

## Guid Support ##

Npgsql EF migrations support uses `uuid_generate_v4()` function to generate guids.
Expand Down

0 comments on commit 08e00f1

Please sign in to comment.