Entity Framework Core

In a recent article we have discussed about upgrading legacy applications using .NET Core we mentioned a few different technologies for which, as explained, it would have been difficult to get into details for each of them. This new article will provide more information about Entity Framework Core and why we have decided to use it at Synetec.

Entity Framework Core is not more than a lightweight version of the popular Entity Framework. For readers who don’t know anything about that it is an object-relational mapper (ORM) which means that developers don’t need to write most of the data access code needed to communicate with the database. One of the big benefit of that is that you could have engineers with very little or no experience writing SQL. There are debate within the community talking about the benefits of using an ORM or simply to stick with SQL code and stored procedures. We mentioned in the previous article that there is no perfect solution and the technical decisions you make can be driven by what you want to achieve with your applications.

 

Let’s see some advantages of using Entity Framework Core and ORMs in general:

  1. Productivity: as the developers don’t need to worry about writing the data access code they have more time to focus on the feature development itself
  2. Application design: an ORM is a tool designed by experienced engineers and architects which means that to fully take advantages of it you need to adopt good programming practices in your applications
  3. Code reuse: writing a class library to access your entities is a good approach and you would need to write it only once and reference the library in the applications when you need it
  4. Maintainability: if integrated properly with a good architecture when you need to change your database schema you wouldn’t need to rewrite the business logic and how your entities are used across the applications.

Of course advantages means that there are some disadvantages:

  1. Understanding: developer who are not very curious by nature won’t understand what the code is actually doing behind the scene
  2. Control: you have less control than when you write plain SQL
  3. Performance: as the SQL is generated by the tool it makes it more complicated to control the performances of the data access and for complex queries an ORM will fail to compete with SQL, particularly as sql stored procedures are pre-compiled and ORM queries are not.

As with .NET Core, Entity Framework Core is a brand new tool, not just a simple upgrade of Entity Framework 6. The great benefit being that the tool can start its journey based on good foundations and a disadvantage being of course that it is not as mature as its predecessor.

 

If you want to know the details of how to integrate the tool a search on Google will give you more information than you need on the first page. The focus for this series of articles is to analyze the technologies we are currently adopting at Synetec and also to explain the decisions we made. So don’t hesitate to subscribe to receive more news about exciting technologies.

Written by Tarik Miri

Leave a Reply

RECENT POSTS

RECENT JOBS

ADDRESS

413 The Print Rooms
164-180 Union Street
London, SE1 0LH
Phone: 0208 1444 206
Website: synetec.co.uk
Email: info@synetec.co.uk

DISCLAIMER

Important: The information contained in this website is for general information purposes only. Any reliance you place on such information is therefore strictly at your own risk. Synetec Ltd endeavour to keep it up to date and correct.
All images are copyrighted to their respective owners.
Bitnami