2

I am working with Effort and Entity Framework 4.1(code first). When I create fake databadse and try to add something

DbConnection connection = Effort.DbConnectionFactory.CreateTransient();

using (var context = new LoveDatabaseContext(connection))
{
    context.Banners.Add(new Banners() { Enabled = true, Name = "Test", Priority = 1, Url = "http:\\test.com" });
}

I am getting error: System.ArgumentException: Duplicate type name within an assembly.

I clean solution rebuilt and it not worked for me

Robert
  • 5,278
  • 43
  • 65
  • 115
user3189794
  • 21
  • 1
  • 3
  • Duplicate of http://stackoverflow.com/questions/7328364/system-argumentexception-duplicate-type-name-within-an-assembly where a clean is only 1 of the answers. – SilverSideDown Mar 19 '14 at 20:46
  • possible duplicate of [Entity Framework Duplicate type name within an assembly (6.1.0)](http://stackoverflow.com/questions/23189266/entity-framework-duplicate-type-name-within-an-assembly-6-1-0) – SoManyGoblins Dec 04 '14 at 12:35

1 Answers1

1

I have found this happens when debugging, put your breakpoint after the call to the database.

Peter
  • 7,792
  • 9
  • 63
  • 94