Ejemplo n.º 1
0
        public Repository(IEntityMappingConfigFactory entityMappingConfigFactory, IConfiguration configuration)
            : base(configuration)
        {
            _entityMappingConfig = entityMappingConfigFactory.Create(typeof(T));
            _tableName           = _entityMappingConfig.GetTableName();

            _fields = EntityExtensions.GetFieldNames(typeof(T))
                      .Select(fieldName => _entityMappingConfig
                              .GetColumnPropretyByFieldName(fieldName))
                      .Where(field => field != null && field.IsValid())
                      .ToList();
        }