Пример #1
0
 /// <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
     }
 }
Пример #3
0
        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
        }
Пример #4
0
 public PropertyModelInfo(SimplePropertyEntityInfo property, IColumn <ColumnContent> column)
     : base(column.Content.CodeNameCamelCase, property.Type)
 {
     Property = property;
     Column   = column;
 }