I want to create a database table which includes the relations of this two entity class. After the migration i cannot see the relation tables, only my db set tables. I will share the code below.
This is one entity,
public class Server:IEntity
{
[Key]
public int ServerId { get; set; }
public string ServerPassword { get; set; }
// public List<AppUser> UserId { get; set; } do not necessary
public string ServerName { get; set; }
public DateTime ModifiedDate { get; set; }
public DateTime CreateDate { get; set; }
}
And this is the other
public class Project:IEntity
{
public string ProjectName { get; set; }
public int ProjectId { get; set; }
public int ServerId { get; set; }
public virtual Server Server { get; set; }
}
and my Dbset class
public class AppIdentityDbContext : IdentityDbContext<AppUser, AppRole, string>
{
public AppIdentityDbContext(DbContextOptions<AppIdentityDbContext> options) : base(options)
{
}
public DbSet<Server> Servers { get; set; }
public DbSet<Project> Projects { get; set; }
}
