Live data from Hacker News

Open Source .NET libraries that make your life easier

thomasvm.github.io

11–20 of 116 posts

Re: Open Source .NET libraries that make your life easier

#12
post #4

To add to the author's list: * I seem to install Json.net in every .NET project I create (json serializer - thanks James Newton-King!) * NLog for logging. It's fantastic. * Dapper is also excellent (Micro ORM) (and anything written by Marc Gravell is generally top-notch - see protobuf-net, miniprofiler, StackExchange.Redis) * Automapper, to avoid writing boilerplate code to convert between similarly shaped types (E.G…

How does Automapper compare to Entity Framework? We use Elmah instead of Nlog, which is also fine. Looks like NLog is a bit more flexible than Elmah is. But Elmah is KISS which is nice.

AutoMapper does not really compare to EF. AutoMapper is used to copy automatically data between two objects of different classes (like a.UtilisateurName = b.Utilisateur.Name). It uses Reflection for that. I will try to link automatically properties by their names. The two classes do not have to have the same format. It works if one the classes is the flattened version of the other.

It might not be really clear, sorry. Try to look on their website https://github.com/AutoMapper/AutoMapper/wiki/Getting-starte....

Re: Open Source .NET libraries that make your life easier

#14
post #4

To add to the author's list: * I seem to install Json.net in every .NET project I create (json serializer - thanks James Newton-King!) * NLog for logging. It's fantastic. * Dapper is also excellent (Micro ORM) (and anything written by Marc Gravell is generally top-notch - see protobuf-net, miniprofiler, StackExchange.Redis) * Automapper, to avoid writing boilerplate code to convert between similarly shaped types (E.G…

How does Automapper compare to Entity Framework? We use Elmah instead of Nlog, which is also fine. Looks like NLog is a bit more flexible than Elmah is. But Elmah is KISS which is nice.

Automapper and Entity Framework are two absolutely different things. The first one in a mappings library and the other one is a full ORM.

Automapper basically allows you to convert a DB Model to a DTO or a ViewModel.

Re: Open Source .NET libraries that make your life easier

#15
post #13
post #8

You guys should check these ones: * Hangfire( http://hangfire.io/ ): for background jobs. * Polly( https://github.com/michael-wolfenden/Polly ): For exception handling policies. Edit: formatting.

Hangfire is the first library in the post.

My fault, I just read the comments here :)

Re: Open Source .NET libraries that make your life easier

#17
post #4

To add to the author's list: * I seem to install Json.net in every .NET project I create (json serializer - thanks James Newton-King!) * NLog for logging. It's fantastic. * Dapper is also excellent (Micro ORM) (and anything written by Marc Gravell is generally top-notch - see protobuf-net, miniprofiler, StackExchange.Redis) * Automapper, to avoid writing boilerplate code to convert between similarly shaped types (E.G…

How does Automapper compare to Entity Framework? We use Elmah instead of Nlog, which is also fine. Looks like NLog is a bit more flexible than Elmah is. But Elmah is KISS which is nice.

I think you're asking about Dapper (ORM) which could be compared to Entity Framework. The two major things to think about if comparing would be simplicity and speed. Dapper is simple to setup and use. It uses standard SQL and it's very fast. On the other hand, this is not a fair comparison. EF is has many more features and options. Use the right tool for the right job depending on requirements. Elmah and NLog are not apples to apples either. Elmah make dealing with "Unhandled" exceptions very simple. Nlog is for application logging (Trace, Info) and exception management (A try catch scenario).

Re: Open Source .NET libraries that make your life easier

#18
post #10
post #7

Earlier quoted context omitted.

Never understood the point of Automapper when you can write explicit/implicit user defined typed conversions in C#.

could you elaborate a bit more on that?

https://msdn.microsoft.com/en-us/library/z5z9kes2.aspx

Doesn't completely replace automapper

Re: Open Source .NET libraries that make your life easier

#20
post #17

Earlier quoted context omitted.

How does Automapper compare to Entity Framework? We use Elmah instead of Nlog, which is also fine. Looks like NLog is a bit more flexible than Elmah is. But Elmah is KISS which is nice.

I think you're asking about Dapper (ORM) which could be compared to Entity Framework. The two major things to think about if comparing would be simplicity and speed. Dapper is simple to setup and use. It uses standard SQL and it's very fast. On the other hand, this is not a fair comparison. EF is has many more features and options. Use the right tool for the right job depending on requirements. Elmah and NLog are not…

In fact it is not uncommon for me to use both Dapper and EF on the same project. Usually I'll use Dapper for the query/reporting side and EF for the domain model/update side. (Used to use nHibernate, but it seems to have really stagnated unfortunately)
Post reply on HN