MonoSoftware.MonoX.DAL.EntityClasses.SnDiscussionMessageEntity.GetRelationsForField C# (CSharp) Method

GetRelationsForField() static private method

Gets the relation objects which represent the relation the fieldName specified is mapped on.
static private GetRelationsForField ( string fieldName ) : RelationCollection
fieldName string Name of the field mapped onto the relation of which the relation objects have to be obtained.
return RelationCollection
        internal static RelationCollection GetRelationsForField(string fieldName)
        {
            RelationCollection toReturn = new RelationCollection();
            switch(fieldName)
            {
                case "AdminAttentionReportedByUser":
                    toReturn.Add(Relations.AspnetUsersEntityUsingAdminAttentionReportedByUserId);
                    break;
                case "AspnetUser":
                    toReturn.Add(Relations.AspnetUsersEntityUsingUserId);
                    break;
                case "DeleteRequestedByUser":
                    toReturn.Add(Relations.AspnetUsersEntityUsingDeleteRequestedByUserId);
                    break;
                case "PinnedByUser":
                    toReturn.Add(Relations.AspnetUsersEntityUsingPinnedByUserId);
                    break;
                case "SnDiscussionTopic":
                    toReturn.Add(Relations.SnDiscussionTopicEntityUsingSnDiscussionTopicId);
                    break;
                case "SnRelationships":
                    toReturn.Add(Relations.SnRelationshipEntityUsingDiscussionMessageId);
                    break;
                default:
                    break;
            }
            return toReturn;
        }