Umbraco Models umbracoUser foreign key on custom table
I'm trying to save the current user logged in to a custom table created in the database; ( I have the ID using authResource)
I have the schema created and want to add a foreign key constraint on field in my model.
I've created the constraint in my database, now I want to define it explicitly in my model.cs
(End goal is that I want it (explicitly) exposed to my controller.)
[Column("modified_by"), ForeignKey(typeof(xxxx), Name = "FK_")]
[IndexAttribute(IndexTypes.NonClustered, Name = "IX_")]
public int modified_by { get; set; } // int
How do I (can I) declare the umbracoUser table for the typeof() ?
[Column("modified_by"), ForeignKey(typeof(Umbraco.Core.Models.Membership.User), Name = "FK_nftaFeatures_umbracoUser_modified")]
public int modified_by { get; set; } // int
[Column("created_by"), ForeignKey(typeof(Umbraco.Core.Models.Membership.User), Name = "FK_nftaFeatures_umbracoUser_modified")]
public int created_by { get; set; } // int
Umbraco Models umbracoUser foreign key on custom table
I'm trying to save the current user logged in to a custom table created in the database; ( I have the ID using authResource)
I have the schema created and want to add a foreign key constraint on field in my model.
I've created the constraint in my database, now I want to define it explicitly in my model.cs
(End goal is that I want it (explicitly) exposed to my controller.)
How do I (can I) declare the umbracoUser table for the typeof() ?
I think my new decoration will look like this:
is working on a reply...