@@ -369,10 +369,14 @@ modelBuilder.Entity<Payment>()
369
369
370
370
modelBuilder .Entity <Payment >()
371
371
.Property (b => b .Description )
372
- .Ignore ( );
372
+ .HasColumnName ( " Desc " );
373
373
374
374
modelBuilder .Entity <Account >()
375
375
.HasKey (c => c .Id );
376
+
377
+ modelBuilder .Entity <Account >()
378
+ .Property (b => b .Secret )
379
+ .Ignore ();
376
380
```
377
381
378
382
C # entity definitions :
@@ -389,6 +393,7 @@ record Account
389
393
{
390
394
public string Id { get ; set ; } = null ! ;
391
395
public decimal Balance { get ; set ; }
396
+ public string Secret { get ; set ; }
392
397
}
393
398
```
394
399
@@ -408,15 +413,16 @@ responseMessage = await restApiProvider.CreateTableAsync<Account>(entityCreation
408
413
Generated KSQL :
409
414
410
415
```SQL
411
- CREATE TYPE Payment AS STRUCT < Id VARCHAR , Amount DECIMAL (10 ,2 )> ;
416
+ CREATE TYPE Payment AS STRUCT < Id VARCHAR , Amount DECIMAL (10 ,2 ), Desc VARCHAR > ;
412
417
413
418
CREATE TABLE IF NOT EXISTS Accounts (
414
419
Id VARCHAR PRIMARY KEY ,
415
420
Balance DECIMAL (14 ,14 )
416
421
) WITH ( KAFKA_TOPIC = 'Account' , VALUE_FORMAT = 'Json' , PARTITIONS = '3' , REPLICAS = '3' );
417
422
```
418
423
419
- The `Description ` field in the `Payment ` type is ignored during code generation , and the `Id ` field in the `Account ` table is marked as the **primary key **.
424
+ The Description property within the `Payment ` type has been customized to override the resulting column name as " Desc" .
425
+ Additionally , the `Id ` property within the `Account ` table has been designated as the ** primary key ** , while the `Secret ` property is disregarded during code generation .
420
426
421
427
### Aggregation functions
422
428
List of supported ksqldb [aggregation functions ](https :// github.com/tomasfabian/ksqlDB.RestApi.Client-DotNet/blob/main/docs/aggregations.md):
0 commit comments