Esempio n. 1
0
        public FieldMapping AddFieldFor(string property, SimpleFieldType type, int len)
        {
            var map = new FieldMapping()
            {
                DbField        = property,
                ObjectProperty = property,
                Length         = len,
                Type           = type
            };

            FieldMapping.Add(map);

            return(map);
        }
Esempio n. 2
0
        public FieldMapping AddFieldFor(string property, SimpleFieldType type, int len)
        {
            var map = new FieldMapping()
            {
                DbField = property,
                ObjectProperty = property,
                Length = len,
                Type = type
            };

            FieldMapping.Add(map);

            return map;
        }
Esempio n. 3
0
        private string TypeExpression(FieldMapping field)
        {
            switch (field.Type)
            {
            case SimpleFieldType.Integer:
                return("integer");

            case SimpleFieldType.Double:
                return("real");

            case SimpleFieldType.Date:
                return("integer");

            case SimpleFieldType.String:
                return(string.Format("varchar({0})", field.Length));

            default:
                return("");
            }
        }
 private string TypeExpression(FieldMapping field)
 {
     switch (field.Type)
     {
         case SimpleFieldType.Integer:
             return "integer";
         case SimpleFieldType.Double:
             return "real";
         case SimpleFieldType.Date:
             return "integer";
         case SimpleFieldType.String:
             return string.Format("varchar({0})", field.Length);
         default:
             return "";
     }
 }