Why is there an additional parameter in the stored procedure when creating a link between the creatures?



  • Good afternoon! Project C#, use Entity Framework. I'm trying to describe the data model through Fluent API Entity FrameWork.

    In the model configuration, add one to many:

    HasRequired(t => t.MemberProcess).WithMany().HasForeignKey(f => f.ProcessId);
    

    MapToStoredProcedures().

    Everything's working well before we add up. I'm adding normal to the record. The list of parameters shall be added after the communication has been made available. @MemberProcess_ProcessId=NULL Which leads to the error of "Listen arguments," which makes it clear that I don't have that parameter in the table.

    In the same table, however, I add a link to another table: HasRequired(t => t.TaskTypes).WithMany().HasForeignKey(f => f.TaskTypeId);And everything works well, no new parameters add up.

    I can't understand why this is happening.



  • The bitches are messing with this problem. But I should have just asked a question, calmly and thoughtfully read the Fluent API manual as it came to a decision. Replaced:

    HasRequired(t => t.MemberProcess).WithMany().HasForeignKey(f => f.ProcessId);
    

     HasRequired(t => t.MemberProcess).WithMany(t => t.Tasks).HasForeignKey(f => f.ProcessId);
    

    And it worked. Thank you all!




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2