Hi,
In a project I use the ef core library with the npgsql driver to access two different databases.
I'm using Npgsql.EFC.PostgreSQL version 2.1.2.
The first uses spatial data, so I use the .UseNetTopologySuite() Extension.
The second database doesn't use spatial data, so I ended up using the following:
services.AddDbContext<FirstContext>(
options => options.UseNpgsql(connectionString1, opts => opts.UseNetTopologySuite());
services.AddDbContext<SecondDbContext>(
options => options.UseNpgsql(connectionString2);
I received errors as soon as I added the second database in the code above. Specifically it seems to unload the NTS support added in the first context.
In order to solve this plugin issue I currently use the following:
services.AddDbContext<FirstContext>(
options => options.UseNpgsql(connectionString1, opts => opts.UseNetTopologySuite());
services.AddDbContext<SecondDbContext>(
options => options.UseNpgsql(connectionString2, opts => opts.UseNetTopologySuite());
I don't know if this is already known, so I'm reporting this issue just in case.
Hi,
In a project I use the ef core library with the npgsql driver to access two different databases.
I'm using Npgsql.EFC.PostgreSQL version 2.1.2.
The first uses spatial data, so I use the
.UseNetTopologySuite()Extension.The second database doesn't use spatial data, so I ended up using the following:
I received errors as soon as I added the second database in the code above. Specifically it seems to unload the NTS support added in the first context.
In order to solve this plugin issue I currently use the following:
I don't know if this is already known, so I'm reporting this issue just in case.