Why I Will Not Use AutoMapper

Why I Will Not Use AutoMapper
   AutoMapper is a library used to copy the properties from one object to another. Developers usually need this to copy data from their entities to their view models or DTOs. I once evaluated AutoMapper for a project and decided that I do not want to use it. Now I am working on a project where I am not the one choosing the tools so I get to use it. I have now confirmed that using AutoMapper is the wrong choice for most projects but interestingly the real-world issues with it were different from what I expected...
Posted by:   Stilgar
02:16 01.10.2016

The NSubstitute Library Is a Piece of Programming Art

The NSubstitute Library Is a Piece of Programming Art
   In the last couple of months I had to use the NSubstitute library. On their github page they define the library as "a friendly substitute for .NET mocking libraries". Essentially it is a mocking library but slightly different. In the past I have used Moq which is considered a high quality mocking library in the .NET world and while unit testing is probably my weakest side as a (business software) developer I have no reason to doubt that. That being said NSubstitute beats Moq so hard it is not even a competition.
Posted by:   Stilgar
21:41 14.09.2016

An Easy Way to Improve Code Readability

An Easy Way to Improve Code Readability
   Readable code has a lot of properties. Following conventions, consistent formatting, proper naming and even architecture affect readability. There is one aspect of readable code that I find often neglected and even broken on purpose for dubious reasons. Good code reads almost like a natural language sentence. While I am all for conventions and formatting I think staying closer to natural language is the most impactful feature of readable code...
Posted by:   Stilgar
16:33 14.05.2016

Five Little Tricks to Make Your Life with Entity Framework Easier

Five Little Tricks to Make Your Life with Entity Framework Easier
   The history of data access technologies in .NET is not a pretty one. Microsoft told us to do DataSets, then SqlDataSource, then LINQ to SQL, then Entity Framework in one way, then Entity Framework in another way. In the meantime many people were using raw ADO.NET and wrote their SQL by hand and other people were using NHibernate. It seems that things have finally settled down. DataSets, DataSources and LINQ to SQL are pretty much dead and it seems NHibernate is about to join them. The people who love control over their SQL are still a minority but they are doing just fine and have added some tools like Dapper to their belts. For the past four or five years most people have been doing (at least for new projects) what Microsoft calls Entity Framework Code First which is a name that in typical Microsoft fashion is very confusing and inaccurate. If you are in that camp you might find the knowledge I am about to share useful. It has come with a lot of battle scars...
Posted by:   Stilgar
10:22 08.02.2016

C# 6.0 Features

C# 6.0 Features
   C# 6.0 has been officially released along with the Roslyn compiler platform. I feel it is my duty to inform the world of my opinion on the topic as undoubtedly millions are interested to learn what they should think about it. Adopting mine is the easiest way to have a correct opinion...
Posted by:   Stilgar
22:12 30.07.2015
First Previous 1 2 3 4 5 6 7 8 9 10  ... Next Last