EF6 Code First Error

Nov 6, 2013 at 4:53 PM
Edited Nov 8, 2013 at 4:57 PM
Hi, i am getting the following error

A first chance exception of type 'System.InvalidOperationException' occurred in EntityFramework.dll

Additional information: Sequence contains no matching element.

the code is the following!!!

var connection = DbConnectionFactory.CreateTransient();

var context = new TestDbContext(connection);

context.Companies.Add(new Company
        {
            IsActive = true,
            Name = "Test",
            Id = 0
        });
        var result = _context.SaveChanges();

        result.Should().Be(1);
Found out what may be the problem. Created an issue instead.
Marked as answer by mantzas on 11/8/2013 at 9:56 AM