Exemplo n.º 1
0
        public IntField ToModel(Entities.Forms.IntField entity)
        {
            var fieldType = entity.FieldType;

            switch (fieldType)
            {
            case FieldTypes.Int:
                return(new IntField
                {
                    AllowFilter = entity.AllowFilter,
                    AllowSort = entity.AllowSort,
                    DefaultValue = entity.DefaultValue,
                    Description = entity.Description,
                    DisplayName = entity.DisplayName,
                    FieldName = entity.FieldName,
                    IsRequired = entity.IsRequired,
                    IsUnique = entity.IsUnique,
                    Max = entity.Max,
                    Min = entity.Min
                });
            }
            throw new InvalidOperationException($"unknown field type {fieldType}");
        }
Exemplo n.º 2
0
 public static Core.Models.Forms.IntField ToModel(this Entities.Forms.IntField entity)
 {
     var fieldType = entity.fiel
 }