Hacker News new | past | comments | ask | show | jobs | submit login

Is Entity used a lot? We looked at using it but it seemed to be inferior to NHibernate (don't remember details, think there was a problem with type error detection and other stuff).



I don't like it, and we don't use it at Fog Creek, but, yes, it's VERY heavily used on piles of projects I know. It's not as efficient or flexible as NHibernate, but it's far easier and vastly better integrated into Visual Studio, making it a bit of a no-brainer for simple persistence needs.


So, what do you guys use at Fog Creek. I've been discussing with my colleagues some of the micro-ORMs like Dapper, Massive, or PetaPoco as an alternative to EF.

http://code.google.com/p/dapper-dot-net/ <br/ > https://github.com/robconery/massive <br/ > http://www.toptensoftware.com/petapoco/ <br/ >


Just to give my 2c, EF is not so much an alternative to Dapper/Massive/PetaPoco as an alternative to NHibernate.

Both are "heavy-duty" orms, while those 3 are more lightweight. My personal view is that for writes and maintaining a domain model, NH (or EF, but I prefer NH) is a good option, and when you need performance or just want a light layer to ease the mappings from sql to objects, micro-orms are the best option.


I don't know what they use at Fog Creek, but I will say that I've been building a lot of things lately in both Massive and PetaPoco, and I've really enjoyed it. I've done several projects in both Linq2SQL and EntityFramework at this point, and they both seem way too 'heavy.' Writing straight sql (or pretty much straight sql) has been a return to simplicity. it's forced me to make sure my queries are efficient, and only return what they need to return.

I do miss using Linq to query the db, but not enough to make me go back. I use EF in my main job, and while it does the job, sometimes I find myself being constrained by the framework. That's not an issue with EF so much as it is an issue with any kind of ORM.


Been having a lot of success with Massive myself. How's using PetaPoco? Any frustrating gotchas?


PetaPoco has been excellent so far. I really like being able to easily switch between dynamic and strongly typed results. If you're not doing "Select * on <table>" the dynamic result is pretty necessary.

I do see where there could be some ways to improve querying the database where you're doing a lot of joins or returning data that is not limited to the table design at all.


Kiln uses LINQ to SQL and Dapper, for the same reasons StackOverflow does: the combination combines speed with flexibility. We expect to ditch one or both in the medium future (we want to support more than just SQL Server), but it's a good fit for the moment.



EF is horrible. I've every version since V1. Every system I've worked on that used EF needed major code tuning under production work loads. Before compiled queries (4.1? 5?) supporting more than a handfull of users concurrently was hard. Plus it is just a leaky abstraction over SQL. Many hours spent running stuff through EF, looking at the reams of SQL produced, and trying to tweak the EF query to produce the desired SQL. NHibernate or Dapper or even plain ole' stored procs are preferable to me.


I've used NHibernate, Linq2Sql, and Entity Framework in real projects. I like EF the best, particularly EF Code First. I'm not fond of NHibernate's configuration files and lack of linq support. EF Code First has its quirks too, but seems very lean.


NHibernate does support LINQ


Yeah ... somewhat ;)

Basic queries do work, but not ready for production use.


But NH has other methods of querying that are readily available. EF doesn't make those as accessible.

I was able to put in full text function support in NH HQL rather easily in an app and I don't see that ability in EF. I'm working on a desktop application and the ability to precompile the dynamic proxies would help the startup time of the application. I would love if I could do that in EF, I've done it before in NHibernate.


Entity Framework has entity sql right? You don't have to use linq?


I've used it on a few projects. I have never used NHibernate, so I can't really compare them, but I really like EF. I don't have a great deal of SQL experience, so I'm much better at writing queries with LINQ methods and prefer it over SQL. It's great having strongly typed entities and the intellisense is awesome, but that's probably true with any ORM.


The company I work for uses it, I'm not thrilled - it's still rough around the edges and I'm used to writing my own SQL, but it gets the job done on the few projects I've used it (I only used V1 which was very bad).


V1 was lousy. EF5 Code First is pretty cool (combined with a micro-ORM for specific queries that might need a perf edge) and EF6 will support async and await.


Looking forward to that :) .

I've noticed you've made great strides with the latest versions, and Microsoft support here in Uruguay has always been great (in particular Pablo Garcia which now moved to Chile).

Keep up the good work :) .

Edit: I'm not on the team, but we're doing one of our main new projects with EF v4.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: