Header
Monday, August 22, 2011
Entity Framework Introduction
I'm starting my new project today and I was informed by our technical architect that we will use the Microsoft Entity Framework. I was so happy when I learned that since I was so depressed, frustrated, and stressed working with Datasets on my previous project. I had almost a month-long of hell dealing with Datasets. I just needed to update fields in several tables but I had to do a lot of stuff to make it happen. Not only that, I encountered a number of ambiguous errors which I can't figure out the causes. I ended up not doing the update on the other tables and creating a new stored procedure. I'm sorry that I keep on ranting about this, I guess I'm not really over with that experience yet.
Anyway, I'm going to discuss a bit about the Entity Framework. The entity framework is Object-Relational Mapping (ORM) tool created by Microsoft to compete with third parties such as NHibernate which have been popular for the past few years. What is a Object-Relational Mapping? As a software developer, I view it as a method of linking the object classes I created to their corresponding database tables. Usually, I do this through code. Like I execute a SQL Select statement then loop through the result and map them to its approriate property in the object class. As a result, I get a list of objects populated with database data. With the use of an ORM tool, my life is a lot simpler since I don't need to create code to retrieve and manipulate data from the database. I just need to call the appropriate method for the database operation I need to implement, the tool abstracts how this happens. It's really powerful and it can increase one's productivity significantly. However, I believe it has its own share of imperfections which is common in every technology available right now. I'm excited to start developing using this. Hopefully, in a couple of days, I will post an update on how to use the Entity framework and a few insights on its pros and cons.
Labels:
.net,
database,
dataset,
entity framework,
microsoft,
object-relational mapping,
orm,
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment