My usual tables include a CreatedBy and UpdatedBy fields, where i store the uniqueidentifier referencing the user from the User table.
Should I be setting all these relations on the Database Diagram? Also, how do i set the relation of the user to itself, since the record might be created/edited by another user, so the User table also includes the same fields.
Accroding to your description,I don't understand your requirment clearly.Could you tell us more details of your requirments to us?
1.What is the specific application scenario?
2.One table is User table,what tables do you have?
3.What is sentence of "since the record might be created/edited by another user"?Do you have users or adminitors?
4.What the relations do you want to have?
Best regards,
Yijing Sun
ASP.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
Contributor
3990 Points
1563 Posts
Re: SQL Server Database Diagram, Entity Framework and CreatedBy/UpdatedBy fields
Jun 24, 2020 06:05 AM|yij sun|LINK
Hi 0belix,
Accroding to your description,I don't understand your requirment clearly.Could you tell us more details of your requirments to us?
1.What is the specific application scenario?
2.One table is User table,what tables do you have?
3.What is sentence of "since the record might be created/edited by another user"?Do you have users or adminitors?
4.What the relations do you want to have?
Best regards,
Yijing Sun