Two questions about Linq to Sql Classes [modified]
-
Hi, Lets say I have a db with two tables: Table Users (UserId, Name) Table Messages (MessageId, FromId, ToId, ...) FromId and ToId are related with the table Users. If I create classes from this db using Linq to Sql Classes I get Class User (Propreties: UserId, Name, Messages, Messages1) Class Message (Properties: MessageId, FromId, ToId, User, User1, ...) My questions: 1. I would like to rename User and User1 to "To" and "From", how do I know which one is To and which one is From, 2. Circular dependencies are bad.. should I remove Messages and Messages1 from the Usre clsas?
modified on Thursday, September 10, 2009 10:46 PM
-
Hi, Lets say I have a db with two tables: Table Users (UserId, Name) Table Messages (MessageId, FromId, ToId, ...) FromId and ToId are related with the table Users. If I create classes from this db using Linq to Sql Classes I get Class User (Propreties: UserId, Name, Messages, Messages1) Class Message (Properties: MessageId, FromId, ToId, User, User1, ...) My questions: 1. I would like to rename User and User1 to "To" and "From", how do I know which one is To and which one is From, 2. Circular dependencies are bad.. should I remove Messages and Messages1 from the Usre clsas?
modified on Thursday, September 10, 2009 10:46 PM