c# - How to add foreign key in AspNetUser Asp.net MVC -
i searched answer 2 days , still did not find easy step-by-step answer question.
as can see, point need have connection between 'boeking' , 'aspnetuser'. 1 aspnetuser can have multiple 'boeking'.
this screenshot of mssql: enter image description here
what should write, in place have connection? thank sincerely taking time , effort me.
this boeking class:
public partial class boeking { [system.diagnostics.codeanalysis.suppressmessage("microsoft.usage", "ca2214:donotcalloverridablemethodsinconstructors")] public boeking() { this.hotelboekings = new hashset<hotelboeking>(); this.tickets = new hashset<ticket>(); } public string netuserid { get; set; } public int boekingid { get; set; } public int trajectid { get; set; } public system.datetime datumboeking { get; set; } public system.datetime vertrekdatum { get; set; } public int reservatienr { get; set; } public virtual traject traject { get; set; } [system.diagnostics.codeanalysis.suppressmessage("microsoft.usage", "ca2227:collectionpropertiesshouldbereadonly")] public virtual icollection<hotelboeking> hotelboekings { get; set; } [system.diagnostics.codeanalysis.suppressmessage("microsoft.usage", "ca2227:collectionpropertiesshouldbereadonly")] public virtual icollection<ticket> tickets { get; set; } }
Comments
Post a Comment