1 //---------------------------------------------------------------------
2 // <copyright file="ModelBuilderErrorCodes.cs" company="Microsoft">
3 //      Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //
6 // @owner       jeffreed
7 // @backupOwner srimand
8 //---------------------------------------------------------------------
9 namespace System.Data.Entity.Design.SsdlGenerator
10 {
11     // This file contains an enum for the errors generated by All the Edm Runtime Tools
12     //
13     // There is almost a one-to-one correspondence between these error codes
14     // and the resource strings - so if you need more insight into what the
15     // error code means, please see the code that uses the particular enum
16     // AND the corresponding resource string
17     //
18     // error numbers end up being hard coded in test cases; they can be removed, but should not be changed.
19     // reusing error numbers is probably OK, but not recommended.
20     //
21     // The acceptable range for this enum is
22     // 6000 - 6999
23     //
24     // The Range 10,000-15,000 is reserved for tools
25     //
26     internal enum ModelBuilderErrorCode
27     {
28         BaseValue = 6000,
29 
30         /// <summary>
31         /// was unable to find an entity container that
32         /// the the type should go into
33         /// </summary>
34         RelationshipSpansSchemas = BaseValue + 1,
35 
36         /// <summary>
37         /// No primary key is defined for the table
38         /// </summary>
39         NoPrimaryKeyDefined = BaseValue + 2,
40 
41         /// <summary>
42         /// Unknown error
43         /// </summary>
44         UnknownError = BaseValue + 3,
45 
46         /// <summary>
47         /// The entity referenced by the relationship was
48         /// not found in database
49         /// </summary>
50         MissingEntity = BaseValue + 4,
51         /// <summary>
52         /// The entity referenced by the relationship was
53         /// not found in database
54         /// </summary>
55         UnsupportedType = BaseValue + 5,
56         /// <summary>
57         /// The value given for the facet does not
58         /// fit in the range given by the facet description
59         /// </summary>
60         FacetValueOutOfRange = BaseValue + 6,
61         /// <summary>
62         /// The association must be skipped because a neede key column
63         /// is missing
64         /// </summary>
65         AssociationMissingKeyColumn = BaseValue + 7,
66                 /// <summary>
67         /// PrimaryKey of a table cannot be the foreignKey in a relationship
68         /// </summary>
69         PrimaryKeyCannotBeForeignKey = BaseValue + 8,
70         /// <summary>
71         /// Found an usupported one to one association
72         /// </summary>
73         OneToOneAssociationFound = BaseValue + 9,
74         /// <summary>
75         /// The ClientAutoGenerated facet can only be set true on properties of type int16, int32, or in64.
76         /// All other types that have the ServerGeneratedPattern on the store property will not
77         /// get the ClientAutoGenerated facet set.
78         /// </summary>
79         ClientAutoGenNotAllowed = BaseValue + 10,
80         /// <summary>
81         /// concepts that model generator can't handle
82         /// </summary>
83         UnsupportedModelGenerationConcept = BaseValue + 11,
84         /// <summary>A value other than IN, OUT, or INOUT was given</summary>
85         ParameterDirectionNotValid = BaseValue + 12,
86         /// <summary>
87         /// Cannot create entity type without keys. The system tried to infer a candidate key from the existing columns
88         /// and create a read-only view but there are no combination of existing columns that could be used to make
89         /// a candidate key.
90         /// </summary>
91         CannotCreateEntityWithoutPrimaryKey = BaseValue + 13,
92         /// <summary>No types were available to determine the namespace from</summary>
93         CodeGenNamespaceCannotBeDetermined = BaseValue + 14,
94         /// <summary>There is a problem with the sourceFilePath provided to codegen</summary>
95         CodeGenSourceFilePathIsInvalid = BaseValue + 15,
96         /// <summary>There is a problem with the sourceFilePath provided to codegen</summary>
97         CodeGenAdditionalEdmSchemaIsInvalid = BaseValue + 16,
98         /// <summary>The navigation property created a generated property name that conflicts with a real property</summary>
99         GeneratedNavigationPropertyNameConflict = BaseValue + 17,
100         /// <summary>Invalid Attribute Supplied For Property</summary>
101         InvalidAttributeSuppliedForProperty = BaseValue + 18,
102         SecurityError = BaseValue + 19,
103         FileNotFound = BaseValue + 20,
104         DirectoryNotFound = BaseValue + 21,
105         IOException = BaseValue + 22,
106         IncompatibleSettingForCaseSensitiveOption = BaseValue + 23,
107         InvalidAttributeSuppliedForType = BaseValue + 24,
108         InvalidMemberSuppliedForType = BaseValue + 25,
109         InvalidInterfaceSuppliedForType = BaseValue + 26,
110         InvalidGetStatementSuppliedForProperty = BaseValue + 27,
111         InvalidSetStatementSuppliedForProperty = BaseValue + 28,
112         GeneratedFactoryMethodNameConflict = BaseValue + 29,
113         UnsupportedForeinKeyPattern = BaseValue + 30,
114         ExcludedColumnWasAKeyColumn = BaseValue + 31,
115         InvalidKeyTypeFound = BaseValue + 32,
116         GeneratedPropertyAccessibilityConflict = BaseValue + 33,
117         DuplicateClassName = BaseValue + 34,
118         UnsupportedDbRelationship = BaseValue + 35,
119         EntityTypeAndSetAccessibilityConflict = BaseValue + 36,
120         SharedForeignKey = BaseValue + 37,
121         SchemaVersionHigherThanTargetVersion = BaseValue + 38,
122         PreprocessTemplateTransformationError = BaseValue + 39,
123         PreprocessTemplateCompilationError = BaseValue + 40,
124         UnableToGenerateForeignKeyPropertiesForV1 = BaseValue + 41,
125         SourceSchemaIsInvalid = BaseValue + 42,
126         TargetVersionNotSupported = BaseValue + 43,
127         /// <summary>
128         /// The tvf return table info was not found in database
129         /// </summary>
130         MissingTvfReturnTable = BaseValue + 44,
131         UnableToGenerateFunctionImportParameterName = BaseValue + 45,
132     }
133 }
134