Tuesday, 22 September 2015

Entity Framework works...

Discovering EF

I found entity framework when I became disenchanted with PHP and I needed more from my programming experience. I had admired C# developers but was scared to even try to learn it as there seemed to be no community around it for a newbie like myself to want to learn. Then I decided to dive in head long and see what would happen and I must say I have not regretted my decision ever since. If I had not made this decision, I would never have known about EF.

Entity Framework finally made me see why I should use a proper ORM not just any kind of ORM. I dreaded the drudgery of writing SQL every time I had to write data access code for my apps. I had to start remembering normal forms, table joins, should i use inner joins or left joins? Did I have to do an outer join before in lefty or ...hmmm I forget. I tried using Doctrine during my time with PHP, but I have to say that doctrine didn't make it easier to leave SQL to use an ORM. I was pleasantly surprised however, to see that with EF, with the SQL theory I know and following conventions even though I could still tweak things with the fluent API, I could get down to doing my DAL with minimum fuss. I have been using c# and EF for about a year or so and I have written applications for my Dad's office, for my wife so she can keep track of our spending and a picture upload app for a photo studio, all database centric applications and EF has been awesome in enabling me to handle my DAL code with elegance.

With EF 7 coming, what really excites me is SQLite and noSQL support. On stackoverflow.com, I gave a less than appealing way to get EF 6 to work with SQLite but seeing that EF 7 promises to work with SQLite has me grinning every time. With the amount of  work put into EF, I would encourge you, if you are using Msft technologies to consider EF instead of direct ADO.NET (even though its a matter of preference when it comes to choosing technologies to employ).
If you wan to try the preview bits of EF 7, go to the aspnet team homepage on github and flex your muscles with EF 7.


 
 

No comments:

Post a Comment