I'm looking how to make EF core to fill the elements automatically. I have a DbDirectory Object with a CreatedBy type User. On the creation I fill the CreatedById. How to make EF core to fill the CreatedBy automatically on the SaveChangesAsync? more Details are present in the screen
This is my context rule
builder.Entity<DbDirectory>().HasOne(directory => directory.CreatedBy);
Those are my attributes
public int CreatedById { get; set; }
public new User.User CreatedBy { get; set; }