log and throw in dot net I read a bit about log and throw and anti-pattern and so on, but I still not get exactly what's the problem.

I'm using entity framework and I want to log every exception appearing with its complete stacktrace. Since this is just an API, I'm not really interested in handling it in the context. 
So, this is my database-context:

public class DatabaseContext : DbContext
{
    private readonly ILog _logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

    public DatabaseContext()
        : base(Db.ConnectionString)
    {
        Database.Log = log =&gt; _logger.Debug(log);
    }

    public override async Task&lt;int&gt; SaveChangesAsync()
    {
        try
        {
            return await base.SaveChangesAsync();
        }
        catch (Exception exception)
        {
            _logger.Error(exception);
            throw;
        }
    }

    public override int SaveChanges()
    {
        try
        {
            return base.SaveChanges();
        }
        catch (Exception exception)
        {
            _logger.Error(exception);
            throw;
        }
    }
}


my question is: is it really bad practice to do this?
I'm not really interested in handling it in the context.


You don't know it yet but you are interested in handling it in a context. Without a context it's as useful as the generic NullReferenceException in .NET. Something happened somewhere but nobody knows where and why.




  is it really bad practice to do this?


Yes it is. The user of your API should take care of logging. You should not force him to log something he might not need or want and most probably he'll log it anyway somewhere else so he'll end up having same exceptions logged multiple times.



If you want to provide a logger for your API then doing it via a decorator would be much better than hardcoding it by inheritance.