0

I'm just messing around with entity framework code first and come with this set up:

My DataContext implements the follow interface:

 public interface IUnitOfWork
 {
     void Commit();
     IDbSet<T> Set<T>() where T : class;
 }

as You can see here: https://codereview.stackexchange.com/a/47904

then in my DataContext I implement:

  public new IDbSet<T> Set<T>() where T : class
  {
      return this.Set<T>();
  }

my Seed method:

 protected override void Seed(DATACONTEXT context)
 {
       context.Set<ENTITY>().AddOrUpdate(p => p.PROPERTY , new ENTITY
       {
           PROPERTY = VALUE
       });
 }

when I run the migration I get an Exception from visual studio.

Is there something wrong with my code? or its just a bug from visual studio?

Community
  • 1
  • 1
Fernando
  • 5
  • 1
  • 4
  • What Exception do you get? – erikduvet Dec 01 '14 at 21:28
  • Problem signature: Problem Event Name: APPCRASH Application Name: devenv.exe Application Version: 12.0.31101.0 Application Timestamp: 54548724 Fault Module Name: StackHash_199c Fault Module Version: 0.0.0.0 Fault Module Timestamp: 00000000 Exception Code: c00000fd Exception Offset: PCH_33 OS Version: 6.3.9600.2.0.0.256.48 Locale ID: 1033 Additional Information 1: 199c Additional Information 2: 199cc907df8a4654c8ebf31545ec3b64 Additional Information 3: ac93 Additional Information 4: ac932fb721b478be6e53cf5b63cba0e7 – Fernando Dec 01 '14 at 21:34
  • See if these steps solve your issue: http://stackoverflow.com/questions/15640883/application-error-visual-studio-keeps-crashing – erikduvet Dec 02 '14 at 12:39

0 Answers0