/// <summary> /// Cria uma nova estrutura de mapeamento entro a propriedade da entidade e uma coluna da tabela. /// </summary> /// <param name="property">Nome da propriedade</param> /// <param name="column">Nome da coluna</param> /// <param name="dataType">Tipo de dado da coluna</param> /// <param name="isAutoIncremented">Define se a coluna é autoincrementada</param> /// <param name="sequenceName">Nome da sequência da coluna</param> /// <param name="isRequired">Define se a coluna é requerida</param> /// <param name="isKey">Define se a coluna é uma chave da tebela</param> /// <param name="isReference">Define a coluna é uma chave de refrência</param> public ColumnMap(string property, string column, DataAnnotations.ERBridge.DataType dataType, bool isAutoIncremented = false, string sequenceName = null, bool isRequired = false, bool isKey = false, bool isReference = false, int length = 0, int precision = 0) { Property = property; Column = column; DataType = dataType; IsAutoIncremented = isAutoIncremented; SequenceName = sequenceName; IsRequired = isRequired; IsKey = isKey; IsReference = isReference; Length = length; Precision = precision; }
public static string GetDataBaseEngineType(DataAnnotations.ERBridge.DataType dataType, int length = 0, int precision = 0) { if (_dataBaseEngineTypeDictionary.ContainsKey(dataType)) { string typeName = _dataBaseEngineTypeDictionary[dataType]; if (length > 0) { typeName += "(" + length; if (precision > 0) { typeName += "," + precision; } typeName += ")"; } return(typeName); } return(null); }
public static string GetDataBaseEngineType(DataAnnotations.ERBridge.DataType dataType, int length = 0, int precision = 0) { throw new NotImplementedException("Not Implemented"); }
public DbType CastDataType(DataAnnotations.ERBridge.DataType dataType) { return((DbType)dataType.GetEnumValue()); }