Npgsql is the .NET data provider for Postgresql. It allows any program developed for .NET framework to access a Postgresql database server. It is implemented in 100% C# code. Postgresql versions since 9.0 are officially supported, others may work.
you want a list, so a ToList(); is probably a better idea
Hey! I have a question regarding JsonDocument.GetProperty(string) method, which doesn't seem to exist even though it is used in the API reference
unfortunately using RootElement leads to The LINQ expression could not be translated
of course I can solve that by adding AsEnumerable() before where, but that kind of defeats the purpose
using JsonElement instead of JsonDocument as a property type for a column doesn't solve that either
what am I doing wrong? any advice?
obviously I can make POCO out of those JsonDocuments, but I have to admit, I think this is quite limiting
removing reference to Newtonsoft.Json is not helping either
@roji do you have some quick start guide to set up the dev environment?
I get this:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1175,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
but I'm not sure which one to download
nevermind got it working by installing VS 2019 Preview 3
@fmakowski yeah, as discussed in npgsql/doc#58 are incorrect - GetProperty is a method on JsonElement, so you need to call JsonDocument.RootElement. But you're saying you have issues using JsonElement too?
@Brar Hi, are you still planning to ship replication in the 5.0 timeframe?
Hi, I get an exception
Detail = "Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information."
How I can enable this? I Use asp.net core. Thanks!
@Skeferstat, the exception already point you what you should do: add Include Error Detail=true to the connection string.
Is there an issue with EDB Stack Builder right now? Have tried running it several times today .. it hangs on "Connecting to server..." when initiating the Language Pack download.
@jberzy yeah, that is the plan - though we're definitely cutting it very short :)
@roji fingers crossed. Let me know if I can be of any assistance with testing. Thanks
Also tried with ambient transaction but still getting unexpected results. Perhaps I'm expectation/logic is wrong, will dig deeper...
@bjornharrtell yeah, EFCore.PG should support System.Transactions (same as the SQL Server provider, for example). If you come up with a code sample that shows weird behavior, please open an issue and we'll investigate.
@roji: Thanks for confirming. I've been able to determine that it was indeed faulty logic/assumptions in the actual data and fixed it now.
Once an NpgsqlConnection is open, is it possible to modify its search path?
Yes, you can simply send a command that does SET search_path=...
Hello guys, I'm in a project at my university that need to work with spatial data which is geometry type (linestring). And I chose ASP .Net core 3.1 mvc to work with. I have connected to postgres successfully. my database have 1 table which has fields as above
and now I dont know how to put that data in my view. I've try to get the geometry directly but it throw an exception about CordinateSystem type
@hainguyen0011 a tip for when asking for help is to provide the error you get
So guys please tell me how can I put that geometry linestring type to view Thank you very much, I'm appriciate P/s: sorry about my bad english
CREATE OR REPLACE VIEW public.my_new_view AS SELECT my_columns FROM table;
thats how you create a view
so for each id I'will have a view right ?
If that is your requirement sure, but it does not make sense
anyway an exception I told about is
and I cant find it on internet
I dont know my direction is right or wrong I just try to do it on asp.net core 3.1