MonoSoftware.MonoX.DAL.EntityClasses.NewsItemEntity.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 "AspnetUser":
                    toReturn.Add(Relations.AspnetUsersEntityUsingUserId);
                    break;
                case "NewsCategory":
                    toReturn.Add(Relations.NewsCategoryEntityUsingNewsCategoryId);
                    break;
                case "NewsFiles":
                    toReturn.Add(Relations.NewsFileEntityUsingNewsItemId);
                    break;
                case "NewsItemLocalizations":
                    toReturn.Add(Relations.NewsItemLocalizationEntityUsingNewsId);
                    break;
                case "NewsPublishQueues":
                    toReturn.Add(Relations.NewsPublishQueueEntityUsingNewsItemId);
                    break;
                case "SnRelationships":
                    toReturn.Add(Relations.SnRelationshipEntityUsingNewsItemId);
                    break;
                default:
                    break;
            }
            return toReturn;
        }