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.
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.
On the other side, if you need to work extensively with stored procedures or you have complicated or custom SQL to run, Dapper (or Insight.Database - https://github.com/jonwagner/Insight.Database, a library which I found really nice to use) will be your best friend.
I hope it's one of the pain points they will address and solve during their rewrite to EF7 at one point.
That being said, my opinion is that unless you have really strict performance and/or latency requirements, EF should be good enough. At least for simpler queries and in 'longer-running' applications :)
Dapper distills the converting database rows to objects. It's a micro ORM, which means it doesn't try to abstract SQL like a monolithic ORM (NHibernate, EntityFramework) would do. Example:
public TagModel GetTag(long id)
{
using (var conn = m_connector.GetConnection())
{
return conn.Query<TagModel>("SELECT TOP 1 * FROM Tags WHERE Id = @Id", new { Id = id }).FirstOrDefault();
}
}It might not be really clear, sorry. Try to look on their website https://github.com/AutoMapper/AutoMapper/wiki/Getting-starte....
Automapper basically allows you to convert a DB Model to a DTO or a ViewModel.