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

java - unable show chart in xls document using jasper reports -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -

javascript - How to change image src on success AJAX -