'rename fields in many-to-many relationship in EF core 5
I Have this Entity Model Diagram
Where I have a many-to-many relationship between Licitadores and Ofertas and UTEs and Ofertas son when I create the database I have this
But I would like to use in OfertaUTE as primary keys LicitadorId instead UTEsLicitadoresId, OfertaId instead of OfertasId and UTEId instead UTESId
So in my mapped class
modelBuilder.Entity<LicitacionesEnUTE>().ToTable("OfertaUTE");
I add more fields (payload)
public class LicitacionesEnUTE
{
public string OfertaId { get; set; }
public int UTEId { get; set; }
public int LicitadorId { get; set; }
public bool Adjudicado { get; set; }
public string Plazo { get; set; }
public decimal PresupuestoOfertado { get; set; }
public decimal PorcentajeFulcrum { get; set; }
}
}
But when I create the database I have this
Any idea, please?
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|