/// <summary> /// Initializes a new instance of the <see cref="T:System.Object" /> class. /// </summary> public EntityRelationSide(EntityInfo entity, NavigationPropertyEntityInfo property, NavigationType navigationType, SimplePropertyEntityInfo[] keyColumns) { Property = property; NavigationType = navigationType; KeyColumns = keyColumns; Entity = entity; }
public void Run(MSSQLColumn <TTableContent, TColumnContent> column, SimplePropertyEntityInfo obj) { if (string.IsNullOrEmpty(column.Default)) { obj.DefaultValue = DbDefaultToCSharpConverter.ConvertDefault(column.TypeDescription.BaseType, column.Default); //TODO: Log failed default convertation } }
public void Run(MSSQLColumn <TTableContent, TColumnContent> column, SimplePropertyEntityInfo obj) { obj.IsUnicode = column.TypeDescription.IsUnicode; obj.IsRowGuid = column.IsRowGuid; #region Length if (column.TypeDescription.HasLength) { obj.Length = column.Length; obj.IsFixedLength = column.TypeDescription.IsFixedLength; } #endregion #region DatabaseGeneratedOption switch (column.ColumnType) { case ColumnTypes.Identity: obj.DatabaseGeneratedOption = DatabaseGeneratedOption.Identity; break; case ColumnTypes.IsComputed: obj.DatabaseGeneratedOption = DatabaseGeneratedOption.Computed; break; } #endregion }
public PropertyModelInfo(SimplePropertyEntityInfo property, IColumn <ColumnContent> column) : base(column.Content.CodeNameCamelCase, property.Type) { Property = property; Column = column; }