MonoSoftware.MonoX.DAL.EntityClasses.NewsCategoryEntity.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 "AspnetApplications":
                    toReturn.Add(Relations.AspnetApplicationsEntityUsingApplicationId);
                    break;
                case "NewsCategoryParent":
                    toReturn.Add(Relations.NewsCategoryEntityUsingIdNewsCategoryId);
                    break;
                case "NewsCategoryChildrens":
                    toReturn.Add(Relations.NewsCategoryEntityUsingNewsCategoryId);
                    break;
                case "NewsCategoryInRoles":
                    toReturn.Add(Relations.NewsCategoryInRoleEntityUsingNewsCategoryId);
                    break;
                case "NewsCategoryLocalizations":
                    toReturn.Add(Relations.NewsCategoryLocalizationEntityUsingNewsCategoryId);
                    break;
                case "NewsItems":
                    toReturn.Add(Relations.NewsItemEntityUsingNewsCategoryId);
                    break;
                case "SnRelationshipss":
                    toReturn.Add(Relations.SnRelationshipEntityUsingNewsCategoryId);
                    break;
                case "NewsCategoryTemplate":
                    toReturn.Add(Relations.NewsCategoryTemplateEntityUsingId);
                    break;
                default:
                    break;
            }
            return toReturn;
        }