Using T-SQL SEQUENCE with Entity Framework 6
Your C# code looks fine, but using non-cached sequences instead of IDENTITY (which would be much easier to implement in Entity Framework) does not ensure a gapless incrementing identifier. 

According to this Microsoft article, sequences can generate gaps in some scenarios:


  The sequence object generates numbers according to its definition, but
  the sequence object does not control how the numbers are used.
  Sequence numbers inserted into a table can have gaps when a
  transaction is rolled back, when a sequence object is shared by
  multiple tables, or when sequence numbers are allocated without using
  them in tables.


So, error on saving changes will have consumed the sequence numbers and thus you obtain gaps.

On the database side, this thread approaches the generation of gapless incrementing identifier, but I am also thinking about generating identifiers within the application layer and restoring the value on save failure:

private int PrevSequenceId;
private int SequenceId;

private void SetCarNr()
{
    var carsToSave = ChangeTracker.Entries().Select(e =&gt; e.Entity).OfType&lt;Car&gt;();
    foreach (var c in carsToSave)
    {
        c.CarNr = Interlocked.Increment(ref SequenceId);
    }
}

public override int SaveChanges()
{
    try
    {
        SetCarNr();
        return base.SaveChanges();
        // locking might be required here for thread safety
        PrevSequenceId = SequenceId;
    }
    catch (Exception exc)
    {
        // log stuff if needed

        // locking might be required here for thread safety
        SequenceId = PrevSequenceId;
    }
}


However, this solution may work only if identifiers are generated by the application layer only.