5 ms·
Just curious, do you use .NET at work? If so, does it work well with Postgres? (eg; EntityFramework smoothness)
by rattray 9y ago
Just curious, do you use .NET at work? If so, does it work well with Postgres? (eg; EntityFramework smoothness)
- bpicolo 9y agoI just started trying out pgsql with entityframework core the other day via http://www.npgsql.org/ http://www.npgsql.org/. Super easy to set up and get working with. I've never used EF6 , so I can't really comment there, but I've seen mention that entity framework core is missing features relative to ef6, so that's something to think about. Dealing with not-builtin types like jsonp/hstore is a bit tricky in EF so far it feels like, but doable? Doesn't seem like you can get a real first class experience with that yet though.
- nikcub 9y ago> not-builtin types like jsonp/hstore is a bit tricky in EF so far it feels like, but doable? and no support for spatial data types. it's why i'm still mostly using SQLAlchemy and Python - i'm a big fan of .NET Core, though.
- bpicolo 9y agoHmm. Npgsql supports polygons in some sense, but you have to add some custom bits on top I suppose? I'm not sure how querying works though. SQLAlchemy is pretty much the only framework I've seen do this pretty well, though I have plenty of other qualms with it. Still probably my favorite ORM overall.
- ahoka 9y agoWe use jsonb with ef core. Just use a string property with Column(TypeName="jsonb") and deserialize with newtonsoft. I think you could use raw queries to do some advanced stuff.
- bpicolo 9y agoYeah, that's what I'm doing atm in a new project :) I just wish I could make it a JToken or whatever and give EF a db serializer. Can do similar with getters / setters I guess?
- philliphaydon 9y agoYou should checkout Marten :)
- pianoben 9y agoI write JVM-based server code, so I can't really comment on the experience of using postgresql on .NET. I think that I tried it a few years back, and had an OK time of it, but I wasn't using EF. Sorry!
- philliphaydon 9y agoYes, using PostgreSQL and .NET, but not with EF because EF is too slow. Using Dapper, and hopefully Marten in the near future.
- pbz 9y agoI recommend you take a look at LINQ to DB ( https://github.com/linq2db/linq2db https://github.com/linq2db/linq2db ) instead of EF.
- ahoka 9y agoYes, it does.
- daxfohl 9y agoHaven't tried EF, but works great with Dapper https://github.com/StackExchange/Dapper https://github.com/StackExchange/Dapper on .NET 4.x and Mono.
- yilu331 9y agoyou can just npgsql. it works just fine for most of scenarios