From adad56e429d523f4c91c2d2512c32223b17f81a0 Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 19 Dec 2022 17:24:54 +0800 Subject: Develop secret api. v47 --- .../CrupestApi/CrupestApi.Commons/Crud/ColumnInfo.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/ColumnInfo.cs') diff --git a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/ColumnInfo.cs b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/ColumnInfo.cs index aa3e4f8..3b095b2 100644 --- a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/ColumnInfo.cs +++ b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/ColumnInfo.cs @@ -7,12 +7,16 @@ namespace CrupestApi.Commons.Crud; public class ColumnInfo { private readonly AggregateColumnMetadata _metadata = new AggregateColumnMetadata(); + private ILogger _logger; /// /// Initialize a column without corresponding property. /// - public ColumnInfo(TableInfo table, IColumnMetadata metadata, Type clrType, IColumnTypeProvider typeProvider) + public ColumnInfo(TableInfo table, IColumnMetadata metadata, Type clrType, IColumnTypeProvider typeProvider, ILoggerFactory loggerFactory) { + _logger = loggerFactory.CreateLogger(); + _logger.LogInformation("Create column {} without corresponding property.", ColumnName); + Table = table; _metadata.Add(metadata); ColumnType = typeProvider.Get(clrType); @@ -21,8 +25,11 @@ public class ColumnInfo /// /// Initialize a column with corresponding property. /// - public ColumnInfo(TableInfo table, PropertyInfo propertyInfo, IColumnTypeProvider typeProvider) + public ColumnInfo(TableInfo table, PropertyInfo propertyInfo, IColumnTypeProvider typeProvider, ILoggerFactory loggerFactory) { + _logger = loggerFactory.CreateLogger(); + _logger.LogInformation("Create column {} with corresponding property.", ColumnName); + Table = table; PropertyInfo = propertyInfo; ColumnType = typeProvider.Get(propertyInfo.PropertyType); -- cgit v1.2.3