Identity 3.0 Entity Framework Core 1.0 Foreign-Key -


i'm trying wire one-to-many relationship between company , applicationuser : identityuser. in applicationuser class have:

 public class applicationuser : identityuser  {     [foreignkey("companyid")]     public int companyid { get; set; }  }  public class company {     [key]     public int companyid { get; set; }      public string name { get; set; }      ...  } 

but receive system.argumentexception:

microsoft.entityframeworkcore.infrastructure.idbcontextfactory 1[tcontext]' violates constraint of type 'tcontext' 

you can setup relation this.

public class applicationuser : identityuser  {      public company company { get; set; }  } 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -