Monday, May 5, 2014

Entity Framework

A software framework helps out by providing a general function for something that many, many people have to go through (it makes life easier). Usually people have a very monotonous task and everyone has to do it-- and then someone says "Hey! I have a great idea that would make everyone's life better!" And thus, is born a framework. Its reusable and works on all kinds of software platforms for applications, products and solutions. Some examples of supportive frameworks Software frameworks include support programs, compilers, code libraries, tool sets, and application programming interfaces (APIs) that bring together all the different components to enable development of a project or solution. Entity Framework (EF) helps map data to domain specific objects in the solution. You can view the architecture of it below:

EF will automatically fill in the data access code for the developer and simplifies the process of linking tiers together. If you don't already have it on a project solution, you can get it from NuGet (in VS 2013: Tools > Library Package Manager > Manage NuGet Packages for Solution). NHibernate does a similar linkage for .NET (Hibernate is the Java counterpart), however Entity Framework may be simpler/more compatible with everything because it is a Microsoft add in for an already fully Microsoft environment. It provides easy management of the following relationships between data tables: "one to one", "one to many", and "many to many" (see following screenshot). And of course, you can use the CRUD (Create, Read, Update, Delete) operations on the database.

Entity Framework is part of the ADO.NET technologies set and allows LINQ to be used with SQL, DataSet and Entities. As of June 20th, the latest version is out which is EntityFramework 6.1.1.