internal string CreateInsertFields(T model)
        {
            string result = string.Empty;
            List <ColumnExtender> propertyExtensions = _extender.GetPropertiesExtensions();
            List <ColumnExtender> valuesExtended     = _extender.ValuesExtender(model);

            foreach (EntityInfo field in interpolator.Entity.Fields)
            {
                if (propertyExtensions.Exists(x => x.PropertyName.Equals(field.Name)))
                {
                    ColumnExtender columnExtender = propertyExtensions.First <ColumnExtender>(x => x.PropertyName.Equals(field.Name));
                    field.IsIdentity = columnExtender.IsIdentity;
                    field.MappTo     = columnExtender.ColumnName;
                }
                if (valuesExtended.Exists(x => x.PropertyName.Equals(field.Name)))
                {
                    field.IsIdentity = true;
                }
                if (!field.IsIdentity && string.IsNullOrEmpty(field.TrueValue) && string.IsNullOrEmpty(field.FalseValue))
                {
                    result = string.Format("{0} {1},", result, FieldMapp(field.Name));
                }
            }
            result = string.Format("{0}{1}", result, FieldsMappedToBoolean());
            result = string.Format("{0}{1}", result, CreateInsertExtendedFields(model));
            if (!string.IsNullOrEmpty(interpolator.Entity.LastUpdateField))
            {
                result = string.Format("{0} {1}", result, interpolator.Entity.LastUpdateField);
            }
            return(result.TrimEnd(new char[] { ',', ' ' }));
        }
        internal string CreateInsertExtendedValues(T model)
        {
            string result = string.Empty;
            List <ColumnExtender> valuesExtended = _extender.ValuesExtender(model);

            foreach (EntityInfo field in interpolator.Entity.Fields)
            {
                if (valuesExtended.Exists(x => x.PropertyName.Equals(field.Name)))
                {
                    ColumnExtender columnExtender = valuesExtended.First <ColumnExtender>(x => x.PropertyName.Equals(field.Name));
                    string         extension      = columnExtender.Extension;
                    string         columnName     = columnExtender.ColumnName;
                    result = string.Format("{0} {1},", result, extension);
                }
            }
            return(result.TrimEnd(new char[] { ',', ' ' }));
        }
        internal string CreateField(EntityInfo field)
        {
            List <ColumnExtender> columnExtensions = _extender.GetPropertiesExtensions();

            if (!string.IsNullOrEmpty(field.TrueValue) &&
                !string.IsNullOrEmpty(field.FalseValue) &&
                !columnExtensions.Exists(x => x.PropertyName.Equals(field.Name)))
            {
                return(BooleanValues(field));
            }
            else
            {
                if (columnExtensions.Exists(x => x.PropertyName.Equals(field.Name)))
                {
                    ColumnExtender columnExtender = _extender.GetPropertiesExtensions().First <ColumnExtender>(x => x.PropertyName.Equals(field.Name));
                    string         extension      = columnExtender.Extension;
                    string         alias          = columnExtender.PropertyName;
                    string         columnName     = columnExtender.ColumnName;
                    string         columnBody     = columnName;

                    if (!string.IsNullOrEmpty(extension))
                    {
                        columnBody = extension;
                    }

                    return(string.Format("{0} AS {1}, ", columnBody, alias));
                }
                else
                {
                    if (string.IsNullOrEmpty(field.MappTo))
                    {
                        return(string.Format("{0}, ", field.Name));
                    }
                    else
                    {
                        return(string.Format("{0} AS {1}, ", field.MappTo, field.Name));
                    }
                }
            }
        }