5099

ADO.Net or Entity Framework in Visual Studio 2008

Question:

If you were programming a small database application in .NET 2008 right now would use plain ADO.Net or ADO.Net Entity Framework or some of both both?

I'm using Visual Studio 2008 to learn .Net. I already do quite a bit of programming in MS Access VBA but I've decided it's time to move past the desktop and past the 90's. My question is partially about what I should learn but also very much about what I should actually use in the real world.

Answer1:

Technically Entity Framework is the evolution of ADO.Net. Do yourself a favor and dump data sets in favor of a more robust ORM. At this point nobody should be passing around DataSets anymore.

It is worth noting that Entity Framework is not your only option when it comes to ORMs. There is <a href="http://nhforge.org/Default.aspx" rel="nofollow">NHibernate</a>, <a href="http://www.subsonicproject.com/" rel="nofollow">SubSonic</a>, <a href="http://msdn.microsoft.com/en-us/library/bb386976%28v=VS.90%29.aspx" rel="nofollow">LINQ to SQL</a>, etc... All of which will work just fine in 2008. EF 1 is not fully baked in my opinion.

Answer2:

I would not use the version of Entity Framework that comes with VS 2008. Entity Framework with VS2010 is fine.

I likely wouldn't use ADO.NET either as I always seem to end up writing my own custom ORM then.

For .NET 3.5 / VS 2008, I would recommend NHibernate. Linq To Sql is maybe an option if you want to get started quickly and can throw away the project after you are done (since any project with a long life will probably have to be rewritten to use EF or NHibernate anyway).

So, try NHibernate first, if the learning curve is too intimidating, drop back to LinqToSql or EF. Once you've learned one ORM, learning the second ORM is much easier.

Also, you can read a lot more on choosing an ORM for .NET here:

<a href="https://stackoverflow.com/questions/1377236/nhibernate-entity-framework-active-records-or-linq2sql/" rel="nofollow">NHibernate, Entity Framework, active records or linq2sql</a>

Answer3:

If your database is small enough and you don't have a lot of queries, do ADO.NET, but if you are taking anything of scale, do the Entity Framework as it will be worth the overhead. The data generation and native query keywords will drastically reduce errors.

Answer4:

If you learning, use EF. Whats the point of going backwards. It makes dev a LOT easier. The ADO/Dataset way of doing things is dead. Also if you moving to the web then it is nice to use EF with WCF data services. Its a neat trick to know.

Secondly, why use 2008. IF you learning, get the latest tools. The express editions are really great.

Recommend

  • FFmpeg: building example C codes
  • Android Back-Button quits Phonegap-app when in textarea
  • Header and Footer Css
  • jsdom not loading or not running external scripts in page
  • How to pass variables from javascript to python in Jupyter?
  • Hibernate : Help in resolving exception org.hibernate.HibernateException: Missing table
  • Keycode event for BACKSPACE in JavaFx
  • Using ColdFusion to sign data for single sign-on
  • How can I crawl the two level website with scrapy framework
  • Low impact encryption formula for ROBLOX Lua
  • How to make a column editable on click Angular 4
  • install R package from private repo owned by github organisation
  • Prime numbers c++
  • Firebase tracking/limiting of user request volume
  • AWS Cloudformation Link API Key to API Gateway
  • Normal Query on Cassandra using DataStax Enterprise works, but not solr_query
  • Condition on a timestamp column to select data for a year
  • Two view models ,one for the whole page & the other for a small area
  • C99′s Fixed-Width Integer Types
  • Matplotlib: subplot
  • Getting SPI temperature data from outside of class
  • checkbox doesn't (check/uncheck) work inside bootstrap tab-pane
  • How to get a Builder object from rows related to pivot - Laravel
  • How to change WebBrowser fullscreen video mode?
  • How to use grep to output unique lines of code from a file?
  • the IBM_JAVA error for running jobs in Hadoop 2.2.0
  • Threads and Concurrent Modification Exception working with a list
  • dmtracedump doesn't work, HELP!
  • Optimization of optim() in R ( L-BFGS-B needs finite values of 'fn')
  • .Net core Hosted Services guaranteed to complete
  • Java Collections.shuffle() weird behaviour [closed]
  • How to join two tables from different databases
  • php “page caching” solution suggestions for CMS Applications
  • What is the best way to cache and reuse immutable singleton objects in Java?
  • Jersey serializes character value to ASCII equivalent numeric string
  • CAS 4 - Not able to retrieve the LDAP groups after successful authentication
  • What does the “id” field in an Android “Google Play Music” broadcast intent correspond to?
  • No OpKernel was registered to support Op 'Conv2D' with these attrs