Пример #1
0
        private static string DatatTableColumn(string param, IEnumerable <DataTableColunmEntity> value)
        {
            var dataValueType = new DataValueType();
            var tmpClass      = string.Empty;

            foreach (var item in value)
            {
                if (!string.IsNullOrEmpty(item.KEY_TYPE))
                {
                    if (param == item.TABLE_NAME)
                    {
                        tmpClass = tmpClass + Environment.NewLine +
                                   (@"[PrimaryKey]" + Environment.NewLine +
                                    "public " + dataValueType.ColumnTypes(item.DATA_TYPE == "date" ? "DateTime" : item.DATA_TYPE) + " " + item.COLUMN_NAME + " { get; set; }" + Environment.NewLine);
                    }
                }
                else
                {
                    if (param == item.TABLE_NAME)
                    {
                        tmpClass = tmpClass + Environment.NewLine +
                                   (@"public " + dataValueType.ColumnTypes(item.DATA_TYPE == "date" ? "DateTime" : item.DATA_TYPE) + " " + item.COLUMN_NAME + " { get; set; }" + Environment.NewLine);
                    }
                }

                //Log.LogItem(item.TABLE_NAME, "Entity Classları oluşturuldu");
            }
            tmpClass += @"" + Environment.NewLine +
                        "}" + Environment.NewLine +
                        "}";
            return(tmpClass);
        }