[2025-04-30 21:00:00 ERR] Failed executing DbCommand (13ms) [Parameters=[@p0='?' (DbType = DateTime), @p1='?' (DbType = Int32), @p2='?' (DbType = Decimal), @p3='?' (DbType = Decimal), @p4='?' (DbType = DateTime), @p5='?' (DbType = Int32), @p6='?' (DbType = Decimal), @p7='?' (DbType = Decimal), @p8='?' (DbType = DateTime), @p9='?' (DbType = Int32), @p10='?' (DbType = Decimal), @p11='?' (DbType = Decimal), @p12='?' (DbType = DateTime), @p13='?' (DbType = Int32), @p14='?' (DbType = Decimal), @p15='?' (DbType = Decimal), @p16='?' (DbType = DateTime), @p17='?' (DbType = Int32), @p18='?' (DbType = Decimal), @p19='?' (DbType = Decimal), @p20='?' (DbType = DateTime), @p21='?' (DbType = Int32), @p22='?' (DbType = Decimal), @p23='?' (DbType = Decimal), @p24='?' (DbType = DateTime), @p25='?' (DbType = Int32), @p26='?' (DbType = Decimal), @p27='?' (DbType = Decimal), @p28='?' (DbType = DateTime), @p29='?' (DbType = Int32), @p30='?' (DbType = Decimal), @p31='?' (DbType = Decimal), @p32='?' (DbType = DateTime), @p33='?' (DbType = Int32), @p34='?' (DbType = Decimal), @p35='?' (DbType = Decimal), @p36='?' (DbType = DateTime), @p37='?' (DbType = Int32), @p38='?' (DbType = Decimal), @p39='?' (DbType = Decimal), @p66='?' (DbType = Int32), @p40='?', @p41='?', @p42='?', @p43='?' (DbType = Decimal), @p44='?', @p45='?' (DbType = Decimal), @p46='?', @p47='?', @p48='?' (DbType = Int32), @p49='?' (DbType = Int32), @p50='?' (DbType = DateTime), @p51='?' (DbType = Decimal), @p52='?', @p53='?' (DbType = Double), @p54='?' (DbType = Boolean), @p55='?' (DbType = Boolean), @p56='?' (DbType = Int32), @p57='?' (DbType = Int32), @p58='?' (DbType = Boolean), @p59='?', @p60='?' (DbType = Decimal), @p61='?' (DbType = Double), @p62='?', @p63='?', @p64='?' (DbType = DateTime), @p65='?' (DbType = DateTime), @p93='?' (DbType = Int32), @p67='?', @p68='?', @p69='?', @p70='?' (DbType = Decimal), @p71='?', @p72='?' (DbType = Decimal), @p73='?', @p74='?', @p75='?' (DbType = Int32), @p76='?' (DbType = Int32), @p77='?' (DbType = DateTime), @p78='?' (DbType = Decimal), @p79='?', @p80='?' (DbType = Double), @p81='?' (DbType = Boolean), @p82='?' (DbType = Boolean), @p83='?' (DbType = Int32), @p84='?' (DbType = Int32), @p85='?' (DbType = Boolean), @p86='?', @p87='?' (DbType = Decimal), @p88='?' (DbType = Double), @p89='?', @p90='?', @p91='?' (DbType = DateTime), @p92='?' (DbType = DateTime), @p120='?' (DbType = Int32), @p94='?', @p95='?', @p96='?', @p97='?' (DbType = Decimal), @p98='?', @p99='?' (DbType = Decimal), @p100='?', @p101='?', @p102='?' (DbType = Int32), @p103='?' (DbType = Int32), @p104='?' (DbType = DateTime), @p105='?' (DbType = Decimal), @p106='?', @p107='?' (DbType = Double), @p108='?' (DbType = Boolean), @p109='?' (DbType = Boolean), @p110='?' (DbType = Int32), @p111='?' (DbType = Int32), @p112='?' (DbType = Boolean), @p113='?', @p114='?' (DbType = Decimal), @p115='?' (DbType = Double), @p116='?', @p117='?', @p118='?' (DbType = DateTime), @p119='?' (DbType = DateTime), @p147='?' (DbType = Int32), @p121='?', @p122='?', @p123='?', @p124='?' (DbType = Decimal), @p125='?', @p126='?' (DbType = Decimal), @p127='?', @p128='?', @p129='?' (DbType = Int32), @p130='?' (DbType = Int32), @p131='?' (DbType = DateTime), @p132='?' (DbType = Decimal), @p133='?', @p134='?' (DbType = Double), @p135='?' (DbType = Boolean), @p136='?' (DbType = Boolean), @p137='?' (DbType = Int32), @p138='?' (DbType = Int32), @p139='?' (DbType = Boolean), @p140='?', @p141='?' (DbType = Decimal), @p142='?' (DbType = Double), @p143='?', @p144='?', @p145='?' (DbType = DateTime), @p146='?' (DbType = DateTime), @p174='?' (DbType = Int32), @p148='?', @p149='?', @p150='?', @p151='?' (DbType = Decimal), @p152='?', @p153='?' (DbType = Decimal), @p154='?', @p155='?', @p156='?' (DbType = Int32), @p157='?' (DbType = Int32), @p158='?' (DbType = DateTime), @p159='?' (DbType = Decimal), @p160='?', @p161='?' (DbType = Double), @p162='?' (DbType = Boolean), @p163='?' (DbType = Boolean), @p164='?' (DbType = Int32), @p165='?' (DbType = Int32), @p166='?' (DbType = Boolean), @p167='?', @p168='?' (DbType = Decimal), @p169='?' (DbType = Double), @p170='?', @p171='?', @p172='?' (DbType = DateTime), @p173='?' (DbType = DateTime), @p201='?' (DbType = Int32), @p175='?', @p176='?', @p177='?', @p178='?' (DbType = Decimal), @p179='?', @p180='?' (DbType = Decimal), @p181='?', @p182='?', @p183='?' (DbType = Int32), @p184='?' (DbType = Int32), @p185='?' (DbType = DateTime), @p186='?' (DbType = Decimal), @p187='?', @p188='?' (DbType = Double), @p189='?' (DbType = Boolean), @p190='?' (DbType = Boolean), @p191='?' (DbType = Int32), @p192='?' (DbType = Int32), @p193='?' (DbType = Boolean), @p194='?', @p195='?' (DbType = Decimal), @p196='?' (DbType = Double), @p197='?', @p198='?', @p199='?' (DbType = DateTime), @p200='?' (DbType = DateTime), @p228='?' (DbType = Int32), @p202='?', @p203='?', @p204='?', @p205='?' (DbType = Decimal), @p206='?', @p207='?' (DbType = Decimal), @p208='?', @p209='?', @p210='?' (DbType = Int32), @p211='?' (DbType = Int32), @p212='?' (DbType = DateTime), @p213='?' (DbType = Decimal), @p214='?', @p215='?' (DbType = Double), @p216='?' (DbType = Boolean), @p217='?' (DbType = Boolean), @p218='?' (DbType = Int32), @p219='?' (DbType = Int32), @p220='?' (DbType = Boolean), @p221='?', @p222='?' (DbType = Decimal), @p223='?' (DbType = Double), @p224='?', @p225='?', @p226='?' (DbType = DateTime), @p227='?' (DbType = DateTime), @p255='?' (DbType = Int32), @p229='?', @p230='?', @p231='?', @p232='?' (DbType = Decimal), @p233='?', @p234='?' (DbType = Decimal), @p235='?', @p236='?', @p237='?' (DbType = Int32), @p238='?' (DbType = Int32), @p239='?' (DbType = DateTime), @p240='?' (DbType = Decimal), @p241='?', @p242='?' (DbType = Double), @p243='?' (DbType = Boolean), @p244='?' (DbType = Boolean), @p245='?' (DbType = Int32), @p246='?' (DbType = Int32), @p247='?' (DbType = Boolean), @p248='?', @p249='?' (DbType = Decimal), @p250='?' (DbType = Double), @p251='?', @p252='?', @p253='?' (DbType = DateTime), @p254='?' (DbType = DateTime), @p282='?' (DbType = Int32), @p256='?', @p257='?', @p258='?', @p259='?' (DbType = Decimal), @p260='?', @p261='?' (DbType = Decimal), @p262='?', @p263='?', @p264='?' (DbType = Int32), @p265='?' (DbType = Int32), @p266='?' (DbType = DateTime), @p267='?' (DbType = Decimal), @p268='?', @p269='?' (DbType = Double), @p270='?' (DbType = Boolean), @p271='?' (DbType = Boolean), @p272='?' (DbType = Int32), @p273='?' (DbType = Int32), @p274='?' (DbType = Boolean), @p275='?', @p276='?' (DbType = Decimal), @p277='?' (DbType = Double), @p278='?', @p279='?', @p280='?' (DbType = DateTime), @p281='?' (DbType = DateTime), @p309='?' (DbType = Int32), @p283='?', @p284='?', @p285='?', @p286='?' (DbType = Decimal), @p287='?', @p288='?' (DbType = Decimal), @p289='?', @p290='?', @p291='?' (DbType = Int32), @p292='?' (DbType = Int32), @p293='?' (DbType = DateTime), @p294='?' (DbType = Decimal), @p295='?', @p296='?' (DbType = Double), @p297='?' (DbType = Boolean), @p298='?' (DbType = Boolean), @p299='?' (DbType = Int32), @p300='?' (DbType = Int32), @p301='?' (DbType = Boolean), @p302='?', @p303='?' (DbType = Decimal), @p304='?' (DbType = Double), @p305='?', @p306='?', @p307='?' (DbType = DateTime), @p308='?' (DbType = DateTime)], CommandType='"Text"', CommandTimeout='30'] INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p0, @p1, @p2, @p3) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p4, @p5, @p6, @p7) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p8, @p9, @p10, @p11) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p12, @p13, @p14, @p15) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p16, @p17, @p18, @p19) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p20, @p21, @p22, @p23) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p24, @p25, @p26, @p27) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p28, @p29, @p30, @p31) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p32, @p33, @p34, @p35) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p36, @p37, @p38, @p39) RETURNING "Id"; UPDATE "Flats" SET "AccountNumber" = @p40, "AccountNumber2" = @p41, "AccountNumber3" = @p42, "AdminFees" = @p43, "Apartment" = @p44, "Balance" = @p45, "Building" = @p46, "City" = @p47, "CountParkingSpots" = @p48, "CountRooms" = @p49, "CreateTime" = @p50, "Deposit" = @p51, "Description" = @p52, "Floor" = @p53, "HasBalcony" = @p54, "HasTerrace" = @p55, "InternalId" = @p56, "LandlordId" = @p57, "PetAllowed" = @p58, "Postcode" = @p59, "Price" = @p60, "Size" = @p61, "Street" = @p62, "Title" = @p63, "UpdateTime" = @p64, "YearBuilt" = @p65 WHERE "Id" = @p66; UPDATE "Flats" SET "AccountNumber" = @p67, "AccountNumber2" = @p68, "AccountNumber3" = @p69, "AdminFees" = @p70, "Apartment" = @p71, "Balance" = @p72, "Building" = @p73, "City" = @p74, "CountParkingSpots" = @p75, "CountRooms" = @p76, "CreateTime" = @p77, "Deposit" = @p78, "Description" = @p79, "Floor" = @p80, "HasBalcony" = @p81, "HasTerrace" = @p82, "InternalId" = @p83, "LandlordId" = @p84, "PetAllowed" = @p85, "Postcode" = @p86, "Price" = @p87, "Size" = @p88, "Street" = @p89, "Title" = @p90, "UpdateTime" = @p91, "YearBuilt" = @p92 WHERE "Id" = @p93; UPDATE "Flats" SET "AccountNumber" = @p94, "AccountNumber2" = @p95, "AccountNumber3" = @p96, "AdminFees" = @p97, "Apartment" = @p98, "Balance" = @p99, "Building" = @p100, "City" = @p101, "CountParkingSpots" = @p102, "CountRooms" = @p103, "CreateTime" = @p104, "Deposit" = @p105, "Description" = @p106, "Floor" = @p107, "HasBalcony" = @p108, "HasTerrace" = @p109, "InternalId" = @p110, "LandlordId" = @p111, "PetAllowed" = @p112, "Postcode" = @p113, "Price" = @p114, "Size" = @p115, "Street" = @p116, "Title" = @p117, "UpdateTime" = @p118, "YearBuilt" = @p119 WHERE "Id" = @p120; UPDATE "Flats" SET "AccountNumber" = @p121, "AccountNumber2" = @p122, "AccountNumber3" = @p123, "AdminFees" = @p124, "Apartment" = @p125, "Balance" = @p126, "Building" = @p127, "City" = @p128, "CountParkingSpots" = @p129, "CountRooms" = @p130, "CreateTime" = @p131, "Deposit" = @p132, "Description" = @p133, "Floor" = @p134, "HasBalcony" = @p135, "HasTerrace" = @p136, "InternalId" = @p137, "LandlordId" = @p138, "PetAllowed" = @p139, "Postcode" = @p140, "Price" = @p141, "Size" = @p142, "Street" = @p143, "Title" = @p144, "UpdateTime" = @p145, "YearBuilt" = @p146 WHERE "Id" = @p147; UPDATE "Flats" SET "AccountNumber" = @p148, "AccountNumber2" = @p149, "AccountNumber3" = @p150, "AdminFees" = @p151, "Apartment" = @p152, "Balance" = @p153, "Building" = @p154, "City" = @p155, "CountParkingSpots" = @p156, "CountRooms" = @p157, "CreateTime" = @p158, "Deposit" = @p159, "Description" = @p160, "Floor" = @p161, "HasBalcony" = @p162, "HasTerrace" = @p163, "InternalId" = @p164, "LandlordId" = @p165, "PetAllowed" = @p166, "Postcode" = @p167, "Price" = @p168, "Size" = @p169, "Street" = @p170, "Title" = @p171, "UpdateTime" = @p172, "YearBuilt" = @p173 WHERE "Id" = @p174; UPDATE "Flats" SET "AccountNumber" = @p175, "AccountNumber2" = @p176, "AccountNumber3" = @p177, "AdminFees" = @p178, "Apartment" = @p179, "Balance" = @p180, "Building" = @p181, "City" = @p182, "CountParkingSpots" = @p183, "CountRooms" = @p184, "CreateTime" = @p185, "Deposit" = @p186, "Description" = @p187, "Floor" = @p188, "HasBalcony" = @p189, "HasTerrace" = @p190, "InternalId" = @p191, "LandlordId" = @p192, "PetAllowed" = @p193, "Postcode" = @p194, "Price" = @p195, "Size" = @p196, "Street" = @p197, "Title" = @p198, "UpdateTime" = @p199, "YearBuilt" = @p200 WHERE "Id" = @p201; UPDATE "Flats" SET "AccountNumber" = @p202, "AccountNumber2" = @p203, "AccountNumber3" = @p204, "AdminFees" = @p205, "Apartment" = @p206, "Balance" = @p207, "Building" = @p208, "City" = @p209, "CountParkingSpots" = @p210, "CountRooms" = @p211, "CreateTime" = @p212, "Deposit" = @p213, "Description" = @p214, "Floor" = @p215, "HasBalcony" = @p216, "HasTerrace" = @p217, "InternalId" = @p218, "LandlordId" = @p219, "PetAllowed" = @p220, "Postcode" = @p221, "Price" = @p222, "Size" = @p223, "Street" = @p224, "Title" = @p225, "UpdateTime" = @p226, "YearBuilt" = @p227 WHERE "Id" = @p228; UPDATE "Flats" SET "AccountNumber" = @p229, "AccountNumber2" = @p230, "AccountNumber3" = @p231, "AdminFees" = @p232, "Apartment" = @p233, "Balance" = @p234, "Building" = @p235, "City" = @p236, "CountParkingSpots" = @p237, "CountRooms" = @p238, "CreateTime" = @p239, "Deposit" = @p240, "Description" = @p241, "Floor" = @p242, "HasBalcony" = @p243, "HasTerrace" = @p244, "InternalId" = @p245, "LandlordId" = @p246, "PetAllowed" = @p247, "Postcode" = @p248, "Price" = @p249, "Size" = @p250, "Street" = @p251, "Title" = @p252, "UpdateTime" = @p253, "YearBuilt" = @p254 WHERE "Id" = @p255; UPDATE "Flats" SET "AccountNumber" = @p256, "AccountNumber2" = @p257, "AccountNumber3" = @p258, "AdminFees" = @p259, "Apartment" = @p260, "Balance" = @p261, "Building" = @p262, "City" = @p263, "CountParkingSpots" = @p264, "CountRooms" = @p265, "CreateTime" = @p266, "Deposit" = @p267, "Description" = @p268, "Floor" = @p269, "HasBalcony" = @p270, "HasTerrace" = @p271, "InternalId" = @p272, "LandlordId" = @p273, "PetAllowed" = @p274, "Postcode" = @p275, "Price" = @p276, "Size" = @p277, "Street" = @p278, "Title" = @p279, "UpdateTime" = @p280, "YearBuilt" = @p281 WHERE "Id" = @p282; UPDATE "Flats" SET "AccountNumber" = @p283, "AccountNumber2" = @p284, "AccountNumber3" = @p285, "AdminFees" = @p286, "Apartment" = @p287, "Balance" = @p288, "Building" = @p289, "City" = @p290, "CountParkingSpots" = @p291, "CountRooms" = @p292, "CreateTime" = @p293, "Deposit" = @p294, "Description" = @p295, "Floor" = @p296, "HasBalcony" = @p297, "HasTerrace" = @p298, "InternalId" = @p299, "LandlordId" = @p300, "PetAllowed" = @p301, "Postcode" = @p302, "Price" = @p303, "Size" = @p304, "Street" = @p305, "Title" = @p306, "UpdateTime" = @p307, "YearBuilt" = @p308 WHERE "Id" = @p309; [2025-04-30 21:00:00 ERR] An exception occurred in the database while saving changes for context type 'DAL.EF.EFDbContext'. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. at Npgsql.Internal.NpgsqlConnector.g__ReadMessageLong|223_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) Exception data: Severity: ERROR SqlState: 23502 MessageText: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. SchemaName: public TableName: BalanceDeductionsHistories ColumnName: Id File: execMain.c Line: 1968 Routine: ExecConstraints --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. at Npgsql.Internal.NpgsqlConnector.g__ReadMessageLong|223_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) Exception data: Severity: ERROR SqlState: 23502 MessageText: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. SchemaName: public TableName: BalanceDeductionsHistories ColumnName: Id File: execMain.c Line: 1968 Routine: ExecConstraints --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) [2025-04-30 21:00:00 ERR] Fatal error. Attempt 1 out of 3. Error description: An error occurred while saving the entity changes. See the inner exception for details. [2025-04-30 21:00:01 ERR] Failed executing DbCommand (2ms) [Parameters=[@p0='?' (DbType = DateTime), @p1='?' (DbType = Int32), @p2='?' (DbType = Decimal), @p3='?' (DbType = Decimal), @p4='?' (DbType = DateTime), @p5='?' (DbType = Int32), @p6='?' (DbType = Decimal), @p7='?' (DbType = Decimal), @p8='?' (DbType = DateTime), @p9='?' (DbType = Int32), @p10='?' (DbType = Decimal), @p11='?' (DbType = Decimal), @p12='?' (DbType = DateTime), @p13='?' (DbType = Int32), @p14='?' (DbType = Decimal), @p15='?' (DbType = Decimal), @p16='?' (DbType = DateTime), @p17='?' (DbType = Int32), @p18='?' (DbType = Decimal), @p19='?' (DbType = Decimal), @p20='?' (DbType = DateTime), @p21='?' (DbType = Int32), @p22='?' (DbType = Decimal), @p23='?' (DbType = Decimal), @p24='?' (DbType = DateTime), @p25='?' (DbType = Int32), @p26='?' (DbType = Decimal), @p27='?' (DbType = Decimal), @p28='?' (DbType = DateTime), @p29='?' (DbType = Int32), @p30='?' (DbType = Decimal), @p31='?' (DbType = Decimal), @p32='?' (DbType = DateTime), @p33='?' (DbType = Int32), @p34='?' (DbType = Decimal), @p35='?' (DbType = Decimal), @p36='?' (DbType = DateTime), @p37='?' (DbType = Int32), @p38='?' (DbType = Decimal), @p39='?' (DbType = Decimal), @p40='?' (DbType = DateTime), @p41='?' (DbType = Int32), @p42='?' (DbType = Decimal), @p43='?' (DbType = Decimal), @p44='?' (DbType = DateTime), @p45='?' (DbType = Int32), @p46='?' (DbType = Decimal), @p47='?' (DbType = Decimal), @p48='?' (DbType = DateTime), @p49='?' (DbType = Int32), @p50='?' (DbType = Decimal), @p51='?' (DbType = Decimal), @p52='?' (DbType = DateTime), @p53='?' (DbType = Int32), @p54='?' (DbType = Decimal), @p55='?' (DbType = Decimal), @p56='?' (DbType = DateTime), @p57='?' (DbType = Int32), @p58='?' (DbType = Decimal), @p59='?' (DbType = Decimal), @p60='?' (DbType = DateTime), @p61='?' (DbType = Int32), @p62='?' (DbType = Decimal), @p63='?' (DbType = Decimal), @p64='?' (DbType = DateTime), @p65='?' (DbType = Int32), @p66='?' (DbType = Decimal), @p67='?' (DbType = Decimal), @p68='?' (DbType = DateTime), @p69='?' (DbType = Int32), @p70='?' (DbType = Decimal), @p71='?' (DbType = Decimal), @p72='?' (DbType = DateTime), @p73='?' (DbType = Int32), @p74='?' (DbType = Decimal), @p75='?' (DbType = Decimal), @p76='?' (DbType = DateTime), @p77='?' (DbType = Int32), @p78='?' (DbType = Decimal), @p79='?' (DbType = Decimal), @p106='?' (DbType = Int32), @p80='?', @p81='?', @p82='?', @p83='?' (DbType = Decimal), @p84='?', @p85='?' (DbType = Decimal), @p86='?', @p87='?', @p88='?' (DbType = Int32), @p89='?' (DbType = Int32), @p90='?' (DbType = DateTime), @p91='?' (DbType = Decimal), @p92='?', @p93='?' (DbType = Double), @p94='?' (DbType = Boolean), @p95='?' (DbType = Boolean), @p96='?' (DbType = Int32), @p97='?' (DbType = Int32), @p98='?' (DbType = Boolean), @p99='?', @p100='?' (DbType = Decimal), @p101='?' (DbType = Double), @p102='?', @p103='?', @p104='?' (DbType = DateTime), @p105='?' (DbType = DateTime), @p133='?' (DbType = Int32), @p107='?', @p108='?', @p109='?', @p110='?' (DbType = Decimal), @p111='?', @p112='?' (DbType = Decimal), @p113='?', @p114='?', @p115='?' (DbType = Int32), @p116='?' (DbType = Int32), @p117='?' (DbType = DateTime), @p118='?' (DbType = Decimal), @p119='?', @p120='?' (DbType = Double), @p121='?' (DbType = Boolean), @p122='?' (DbType = Boolean), @p123='?' (DbType = Int32), @p124='?' (DbType = Int32), @p125='?' (DbType = Boolean), @p126='?', @p127='?' (DbType = Decimal), @p128='?' (DbType = Double), @p129='?', @p130='?', @p131='?' (DbType = DateTime), @p132='?' (DbType = DateTime), @p160='?' (DbType = Int32), @p134='?', @p135='?', @p136='?', @p137='?' (DbType = Decimal), @p138='?', @p139='?' (DbType = Decimal), @p140='?', @p141='?', @p142='?' (DbType = Int32), @p143='?' (DbType = Int32), @p144='?' (DbType = DateTime), @p145='?' (DbType = Decimal), @p146='?', @p147='?' (DbType = Double), @p148='?' (DbType = Boolean), @p149='?' (DbType = Boolean), @p150='?' (DbType = Int32), @p151='?' (DbType = Int32), @p152='?' (DbType = Boolean), @p153='?', @p154='?' (DbType = Decimal), @p155='?' (DbType = Double), @p156='?', @p157='?', @p158='?' (DbType = DateTime), @p159='?' (DbType = DateTime), @p187='?' (DbType = Int32), @p161='?', @p162='?', @p163='?', @p164='?' (DbType = Decimal), @p165='?', @p166='?' (DbType = Decimal), @p167='?', @p168='?', @p169='?' (DbType = Int32), @p170='?' (DbType = Int32), @p171='?' (DbType = DateTime), @p172='?' (DbType = Decimal), @p173='?', @p174='?' (DbType = Double), @p175='?' (DbType = Boolean), @p176='?' (DbType = Boolean), @p177='?' (DbType = Int32), @p178='?' (DbType = Int32), @p179='?' (DbType = Boolean), @p180='?', @p181='?' (DbType = Decimal), @p182='?' (DbType = Double), @p183='?', @p184='?', @p185='?' (DbType = DateTime), @p186='?' (DbType = DateTime), @p214='?' (DbType = Int32), @p188='?', @p189='?', @p190='?', @p191='?' (DbType = Decimal), @p192='?', @p193='?' (DbType = Decimal), @p194='?', @p195='?', @p196='?' (DbType = Int32), @p197='?' (DbType = Int32), @p198='?' (DbType = DateTime), @p199='?' (DbType = Decimal), @p200='?', @p201='?' (DbType = Double), @p202='?' (DbType = Boolean), @p203='?' (DbType = Boolean), @p204='?' (DbType = Int32), @p205='?' (DbType = Int32), @p206='?' (DbType = Boolean), @p207='?', @p208='?' (DbType = Decimal), @p209='?' (DbType = Double), @p210='?', @p211='?', @p212='?' (DbType = DateTime), @p213='?' (DbType = DateTime), @p241='?' (DbType = Int32), @p215='?', @p216='?', @p217='?', @p218='?' (DbType = Decimal), @p219='?', @p220='?' (DbType = Decimal), @p221='?', @p222='?', @p223='?' (DbType = Int32), @p224='?' (DbType = Int32), @p225='?' (DbType = DateTime), @p226='?' (DbType = Decimal), @p227='?', @p228='?' (DbType = Double), @p229='?' (DbType = Boolean), @p230='?' (DbType = Boolean), @p231='?' (DbType = Int32), @p232='?' (DbType = Int32), @p233='?' (DbType = Boolean), @p234='?', @p235='?' (DbType = Decimal), @p236='?' (DbType = Double), @p237='?', @p238='?', @p239='?' (DbType = DateTime), @p240='?' (DbType = DateTime), @p268='?' (DbType = Int32), @p242='?', @p243='?', @p244='?', @p245='?' (DbType = Decimal), @p246='?', @p247='?' (DbType = Decimal), @p248='?', @p249='?', @p250='?' (DbType = Int32), @p251='?' (DbType = Int32), @p252='?' (DbType = DateTime), @p253='?' (DbType = Decimal), @p254='?', @p255='?' (DbType = Double), @p256='?' (DbType = Boolean), @p257='?' (DbType = Boolean), @p258='?' (DbType = Int32), @p259='?' (DbType = Int32), @p260='?' (DbType = Boolean), @p261='?', @p262='?' (DbType = Decimal), @p263='?' (DbType = Double), @p264='?', @p265='?', @p266='?' (DbType = DateTime), @p267='?' (DbType = DateTime), @p295='?' (DbType = Int32), @p269='?', @p270='?', @p271='?', @p272='?' (DbType = Decimal), @p273='?', @p274='?' (DbType = Decimal), @p275='?', @p276='?', @p277='?' (DbType = Int32), @p278='?' (DbType = Int32), @p279='?' (DbType = DateTime), @p280='?' (DbType = Decimal), @p281='?', @p282='?' (DbType = Double), @p283='?' (DbType = Boolean), @p284='?' (DbType = Boolean), @p285='?' (DbType = Int32), @p286='?' (DbType = Int32), @p287='?' (DbType = Boolean), @p288='?', @p289='?' (DbType = Decimal), @p290='?' (DbType = Double), @p291='?', @p292='?', @p293='?' (DbType = DateTime), @p294='?' (DbType = DateTime), @p322='?' (DbType = Int32), @p296='?', @p297='?', @p298='?', @p299='?' (DbType = Decimal), @p300='?', @p301='?' (DbType = Decimal), @p302='?', @p303='?', @p304='?' (DbType = Int32), @p305='?' (DbType = Int32), @p306='?' (DbType = DateTime), @p307='?' (DbType = Decimal), @p308='?', @p309='?' (DbType = Double), @p310='?' (DbType = Boolean), @p311='?' (DbType = Boolean), @p312='?' (DbType = Int32), @p313='?' (DbType = Int32), @p314='?' (DbType = Boolean), @p315='?', @p316='?' (DbType = Decimal), @p317='?' (DbType = Double), @p318='?', @p319='?', @p320='?' (DbType = DateTime), @p321='?' (DbType = DateTime), @p349='?' (DbType = Int32), @p323='?', @p324='?', @p325='?', @p326='?' (DbType = Decimal), @p327='?', @p328='?' (DbType = Decimal), @p329='?', @p330='?', @p331='?' (DbType = Int32), @p332='?' (DbType = Int32), @p333='?' (DbType = DateTime), @p334='?' (DbType = Decimal), @p335='?', @p336='?' (DbType = Double), @p337='?' (DbType = Boolean), @p338='?' (DbType = Boolean), @p339='?' (DbType = Int32), @p340='?' (DbType = Int32), @p341='?' (DbType = Boolean), @p342='?', @p343='?' (DbType = Decimal), @p344='?' (DbType = Double), @p345='?', @p346='?', @p347='?' (DbType = DateTime), @p348='?' (DbType = DateTime)], CommandType='"Text"', CommandTimeout='30'] INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p0, @p1, @p2, @p3) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p4, @p5, @p6, @p7) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p8, @p9, @p10, @p11) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p12, @p13, @p14, @p15) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p16, @p17, @p18, @p19) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p20, @p21, @p22, @p23) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p24, @p25, @p26, @p27) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p28, @p29, @p30, @p31) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p32, @p33, @p34, @p35) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p36, @p37, @p38, @p39) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p40, @p41, @p42, @p43) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p44, @p45, @p46, @p47) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p48, @p49, @p50, @p51) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p52, @p53, @p54, @p55) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p56, @p57, @p58, @p59) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p60, @p61, @p62, @p63) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p64, @p65, @p66, @p67) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p68, @p69, @p70, @p71) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p72, @p73, @p74, @p75) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p76, @p77, @p78, @p79) RETURNING "Id"; UPDATE "Flats" SET "AccountNumber" = @p80, "AccountNumber2" = @p81, "AccountNumber3" = @p82, "AdminFees" = @p83, "Apartment" = @p84, "Balance" = @p85, "Building" = @p86, "City" = @p87, "CountParkingSpots" = @p88, "CountRooms" = @p89, "CreateTime" = @p90, "Deposit" = @p91, "Description" = @p92, "Floor" = @p93, "HasBalcony" = @p94, "HasTerrace" = @p95, "InternalId" = @p96, "LandlordId" = @p97, "PetAllowed" = @p98, "Postcode" = @p99, "Price" = @p100, "Size" = @p101, "Street" = @p102, "Title" = @p103, "UpdateTime" = @p104, "YearBuilt" = @p105 WHERE "Id" = @p106; UPDATE "Flats" SET "AccountNumber" = @p107, "AccountNumber2" = @p108, "AccountNumber3" = @p109, "AdminFees" = @p110, "Apartment" = @p111, "Balance" = @p112, "Building" = @p113, "City" = @p114, "CountParkingSpots" = @p115, "CountRooms" = @p116, "CreateTime" = @p117, "Deposit" = @p118, "Description" = @p119, "Floor" = @p120, "HasBalcony" = @p121, "HasTerrace" = @p122, "InternalId" = @p123, "LandlordId" = @p124, "PetAllowed" = @p125, "Postcode" = @p126, "Price" = @p127, "Size" = @p128, "Street" = @p129, "Title" = @p130, "UpdateTime" = @p131, "YearBuilt" = @p132 WHERE "Id" = @p133; UPDATE "Flats" SET "AccountNumber" = @p134, "AccountNumber2" = @p135, "AccountNumber3" = @p136, "AdminFees" = @p137, "Apartment" = @p138, "Balance" = @p139, "Building" = @p140, "City" = @p141, "CountParkingSpots" = @p142, "CountRooms" = @p143, "CreateTime" = @p144, "Deposit" = @p145, "Description" = @p146, "Floor" = @p147, "HasBalcony" = @p148, "HasTerrace" = @p149, "InternalId" = @p150, "LandlordId" = @p151, "PetAllowed" = @p152, "Postcode" = @p153, "Price" = @p154, "Size" = @p155, "Street" = @p156, "Title" = @p157, "UpdateTime" = @p158, "YearBuilt" = @p159 WHERE "Id" = @p160; UPDATE "Flats" SET "AccountNumber" = @p161, "AccountNumber2" = @p162, "AccountNumber3" = @p163, "AdminFees" = @p164, "Apartment" = @p165, "Balance" = @p166, "Building" = @p167, "City" = @p168, "CountParkingSpots" = @p169, "CountRooms" = @p170, "CreateTime" = @p171, "Deposit" = @p172, "Description" = @p173, "Floor" = @p174, "HasBalcony" = @p175, "HasTerrace" = @p176, "InternalId" = @p177, "LandlordId" = @p178, "PetAllowed" = @p179, "Postcode" = @p180, "Price" = @p181, "Size" = @p182, "Street" = @p183, "Title" = @p184, "UpdateTime" = @p185, "YearBuilt" = @p186 WHERE "Id" = @p187; UPDATE "Flats" SET "AccountNumber" = @p188, "AccountNumber2" = @p189, "AccountNumber3" = @p190, "AdminFees" = @p191, "Apartment" = @p192, "Balance" = @p193, "Building" = @p194, "City" = @p195, "CountParkingSpots" = @p196, "CountRooms" = @p197, "CreateTime" = @p198, "Deposit" = @p199, "Description" = @p200, "Floor" = @p201, "HasBalcony" = @p202, "HasTerrace" = @p203, "InternalId" = @p204, "LandlordId" = @p205, "PetAllowed" = @p206, "Postcode" = @p207, "Price" = @p208, "Size" = @p209, "Street" = @p210, "Title" = @p211, "UpdateTime" = @p212, "YearBuilt" = @p213 WHERE "Id" = @p214; UPDATE "Flats" SET "AccountNumber" = @p215, "AccountNumber2" = @p216, "AccountNumber3" = @p217, "AdminFees" = @p218, "Apartment" = @p219, "Balance" = @p220, "Building" = @p221, "City" = @p222, "CountParkingSpots" = @p223, "CountRooms" = @p224, "CreateTime" = @p225, "Deposit" = @p226, "Description" = @p227, "Floor" = @p228, "HasBalcony" = @p229, "HasTerrace" = @p230, "InternalId" = @p231, "LandlordId" = @p232, "PetAllowed" = @p233, "Postcode" = @p234, "Price" = @p235, "Size" = @p236, "Street" = @p237, "Title" = @p238, "UpdateTime" = @p239, "YearBuilt" = @p240 WHERE "Id" = @p241; UPDATE "Flats" SET "AccountNumber" = @p242, "AccountNumber2" = @p243, "AccountNumber3" = @p244, "AdminFees" = @p245, "Apartment" = @p246, "Balance" = @p247, "Building" = @p248, "City" = @p249, "CountParkingSpots" = @p250, "CountRooms" = @p251, "CreateTime" = @p252, "Deposit" = @p253, "Description" = @p254, "Floor" = @p255, "HasBalcony" = @p256, "HasTerrace" = @p257, "InternalId" = @p258, "LandlordId" = @p259, "PetAllowed" = @p260, "Postcode" = @p261, "Price" = @p262, "Size" = @p263, "Street" = @p264, "Title" = @p265, "UpdateTime" = @p266, "YearBuilt" = @p267 WHERE "Id" = @p268; UPDATE "Flats" SET "AccountNumber" = @p269, "AccountNumber2" = @p270, "AccountNumber3" = @p271, "AdminFees" = @p272, "Apartment" = @p273, "Balance" = @p274, "Building" = @p275, "City" = @p276, "CountParkingSpots" = @p277, "CountRooms" = @p278, "CreateTime" = @p279, "Deposit" = @p280, "Description" = @p281, "Floor" = @p282, "HasBalcony" = @p283, "HasTerrace" = @p284, "InternalId" = @p285, "LandlordId" = @p286, "PetAllowed" = @p287, "Postcode" = @p288, "Price" = @p289, "Size" = @p290, "Street" = @p291, "Title" = @p292, "UpdateTime" = @p293, "YearBuilt" = @p294 WHERE "Id" = @p295; UPDATE "Flats" SET "AccountNumber" = @p296, "AccountNumber2" = @p297, "AccountNumber3" = @p298, "AdminFees" = @p299, "Apartment" = @p300, "Balance" = @p301, "Building" = @p302, "City" = @p303, "CountParkingSpots" = @p304, "CountRooms" = @p305, "CreateTime" = @p306, "Deposit" = @p307, "Description" = @p308, "Floor" = @p309, "HasBalcony" = @p310, "HasTerrace" = @p311, "InternalId" = @p312, "LandlordId" = @p313, "PetAllowed" = @p314, "Postcode" = @p315, "Price" = @p316, "Size" = @p317, "Street" = @p318, "Title" = @p319, "UpdateTime" = @p320, "YearBuilt" = @p321 WHERE "Id" = @p322; UPDATE "Flats" SET "AccountNumber" = @p323, "AccountNumber2" = @p324, "AccountNumber3" = @p325, "AdminFees" = @p326, "Apartment" = @p327, "Balance" = @p328, "Building" = @p329, "City" = @p330, "CountParkingSpots" = @p331, "CountRooms" = @p332, "CreateTime" = @p333, "Deposit" = @p334, "Description" = @p335, "Floor" = @p336, "HasBalcony" = @p337, "HasTerrace" = @p338, "InternalId" = @p339, "LandlordId" = @p340, "PetAllowed" = @p341, "Postcode" = @p342, "Price" = @p343, "Size" = @p344, "Street" = @p345, "Title" = @p346, "UpdateTime" = @p347, "YearBuilt" = @p348 WHERE "Id" = @p349; [2025-04-30 21:00:01 ERR] An exception occurred in the database while saving changes for context type 'DAL.EF.EFDbContext'. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. at Npgsql.Internal.NpgsqlConnector.g__ReadMessageLong|223_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) Exception data: Severity: ERROR SqlState: 23502 MessageText: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. SchemaName: public TableName: BalanceDeductionsHistories ColumnName: Id File: execMain.c Line: 1968 Routine: ExecConstraints --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. at Npgsql.Internal.NpgsqlConnector.g__ReadMessageLong|223_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) Exception data: Severity: ERROR SqlState: 23502 MessageText: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. SchemaName: public TableName: BalanceDeductionsHistories ColumnName: Id File: execMain.c Line: 1968 Routine: ExecConstraints --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) [2025-04-30 21:00:01 ERR] Fatal error. Attempt 2 out of 3. Error description: An error occurred while saving the entity changes. See the inner exception for details. [2025-04-30 21:00:02 ERR] Failed executing DbCommand (2ms) [Parameters=[@p0='?' (DbType = DateTime), @p1='?' (DbType = Int32), @p2='?' (DbType = Decimal), @p3='?' (DbType = Decimal), @p4='?' (DbType = DateTime), @p5='?' (DbType = Int32), @p6='?' (DbType = Decimal), @p7='?' (DbType = Decimal), @p8='?' (DbType = DateTime), @p9='?' (DbType = Int32), @p10='?' (DbType = Decimal), @p11='?' (DbType = Decimal), @p12='?' (DbType = DateTime), @p13='?' (DbType = Int32), @p14='?' (DbType = Decimal), @p15='?' (DbType = Decimal), @p16='?' (DbType = DateTime), @p17='?' (DbType = Int32), @p18='?' (DbType = Decimal), @p19='?' (DbType = Decimal), @p20='?' (DbType = DateTime), @p21='?' (DbType = Int32), @p22='?' (DbType = Decimal), @p23='?' (DbType = Decimal), @p24='?' (DbType = DateTime), @p25='?' (DbType = Int32), @p26='?' (DbType = Decimal), @p27='?' (DbType = Decimal), @p28='?' (DbType = DateTime), @p29='?' (DbType = Int32), @p30='?' (DbType = Decimal), @p31='?' (DbType = Decimal), @p32='?' (DbType = DateTime), @p33='?' (DbType = Int32), @p34='?' (DbType = Decimal), @p35='?' (DbType = Decimal), @p36='?' (DbType = DateTime), @p37='?' (DbType = Int32), @p38='?' (DbType = Decimal), @p39='?' (DbType = Decimal), @p40='?' (DbType = DateTime), @p41='?' (DbType = Int32), @p42='?' (DbType = Decimal), @p43='?' (DbType = Decimal), @p44='?' (DbType = DateTime), @p45='?' (DbType = Int32), @p46='?' (DbType = Decimal), @p47='?' (DbType = Decimal), @p48='?' (DbType = DateTime), @p49='?' (DbType = Int32), @p50='?' (DbType = Decimal), @p51='?' (DbType = Decimal), @p52='?' (DbType = DateTime), @p53='?' (DbType = Int32), @p54='?' (DbType = Decimal), @p55='?' (DbType = Decimal), @p56='?' (DbType = DateTime), @p57='?' (DbType = Int32), @p58='?' (DbType = Decimal), @p59='?' (DbType = Decimal), @p60='?' (DbType = DateTime), @p61='?' (DbType = Int32), @p62='?' (DbType = Decimal), @p63='?' (DbType = Decimal), @p64='?' (DbType = DateTime), @p65='?' (DbType = Int32), @p66='?' (DbType = Decimal), @p67='?' (DbType = Decimal), @p68='?' (DbType = DateTime), @p69='?' (DbType = Int32), @p70='?' (DbType = Decimal), @p71='?' (DbType = Decimal), @p72='?' (DbType = DateTime), @p73='?' (DbType = Int32), @p74='?' (DbType = Decimal), @p75='?' (DbType = Decimal), @p76='?' (DbType = DateTime), @p77='?' (DbType = Int32), @p78='?' (DbType = Decimal), @p79='?' (DbType = Decimal), @p80='?' (DbType = DateTime), @p81='?' (DbType = Int32), @p82='?' (DbType = Decimal), @p83='?' (DbType = Decimal), @p84='?' (DbType = DateTime), @p85='?' (DbType = Int32), @p86='?' (DbType = Decimal), @p87='?' (DbType = Decimal), @p88='?' (DbType = DateTime), @p89='?' (DbType = Int32), @p90='?' (DbType = Decimal), @p91='?' (DbType = Decimal), @p92='?' (DbType = DateTime), @p93='?' (DbType = Int32), @p94='?' (DbType = Decimal), @p95='?' (DbType = Decimal), @p96='?' (DbType = DateTime), @p97='?' (DbType = Int32), @p98='?' (DbType = Decimal), @p99='?' (DbType = Decimal), @p100='?' (DbType = DateTime), @p101='?' (DbType = Int32), @p102='?' (DbType = Decimal), @p103='?' (DbType = Decimal), @p104='?' (DbType = DateTime), @p105='?' (DbType = Int32), @p106='?' (DbType = Decimal), @p107='?' (DbType = Decimal), @p108='?' (DbType = DateTime), @p109='?' (DbType = Int32), @p110='?' (DbType = Decimal), @p111='?' (DbType = Decimal), @p112='?' (DbType = DateTime), @p113='?' (DbType = Int32), @p114='?' (DbType = Decimal), @p115='?' (DbType = Decimal), @p116='?' (DbType = DateTime), @p117='?' (DbType = Int32), @p118='?' (DbType = Decimal), @p119='?' (DbType = Decimal), @p146='?' (DbType = Int32), @p120='?', @p121='?', @p122='?', @p123='?' (DbType = Decimal), @p124='?', @p125='?' (DbType = Decimal), @p126='?', @p127='?', @p128='?' (DbType = Int32), @p129='?' (DbType = Int32), @p130='?' (DbType = DateTime), @p131='?' (DbType = Decimal), @p132='?', @p133='?' (DbType = Double), @p134='?' (DbType = Boolean), @p135='?' (DbType = Boolean), @p136='?' (DbType = Int32), @p137='?' (DbType = Int32), @p138='?' (DbType = Boolean), @p139='?', @p140='?' (DbType = Decimal), @p141='?' (DbType = Double), @p142='?', @p143='?', @p144='?' (DbType = DateTime), @p145='?' (DbType = DateTime), @p173='?' (DbType = Int32), @p147='?', @p148='?', @p149='?', @p150='?' (DbType = Decimal), @p151='?', @p152='?' (DbType = Decimal), @p153='?', @p154='?', @p155='?' (DbType = Int32), @p156='?' (DbType = Int32), @p157='?' (DbType = DateTime), @p158='?' (DbType = Decimal), @p159='?', @p160='?' (DbType = Double), @p161='?' (DbType = Boolean), @p162='?' (DbType = Boolean), @p163='?' (DbType = Int32), @p164='?' (DbType = Int32), @p165='?' (DbType = Boolean), @p166='?', @p167='?' (DbType = Decimal), @p168='?' (DbType = Double), @p169='?', @p170='?', @p171='?' (DbType = DateTime), @p172='?' (DbType = DateTime), @p200='?' (DbType = Int32), @p174='?', @p175='?', @p176='?', @p177='?' (DbType = Decimal), @p178='?', @p179='?' (DbType = Decimal), @p180='?', @p181='?', @p182='?' (DbType = Int32), @p183='?' (DbType = Int32), @p184='?' (DbType = DateTime), @p185='?' (DbType = Decimal), @p186='?', @p187='?' (DbType = Double), @p188='?' (DbType = Boolean), @p189='?' (DbType = Boolean), @p190='?' (DbType = Int32), @p191='?' (DbType = Int32), @p192='?' (DbType = Boolean), @p193='?', @p194='?' (DbType = Decimal), @p195='?' (DbType = Double), @p196='?', @p197='?', @p198='?' (DbType = DateTime), @p199='?' (DbType = DateTime), @p227='?' (DbType = Int32), @p201='?', @p202='?', @p203='?', @p204='?' (DbType = Decimal), @p205='?', @p206='?' (DbType = Decimal), @p207='?', @p208='?', @p209='?' (DbType = Int32), @p210='?' (DbType = Int32), @p211='?' (DbType = DateTime), @p212='?' (DbType = Decimal), @p213='?', @p214='?' (DbType = Double), @p215='?' (DbType = Boolean), @p216='?' (DbType = Boolean), @p217='?' (DbType = Int32), @p218='?' (DbType = Int32), @p219='?' (DbType = Boolean), @p220='?', @p221='?' (DbType = Decimal), @p222='?' (DbType = Double), @p223='?', @p224='?', @p225='?' (DbType = DateTime), @p226='?' (DbType = DateTime), @p254='?' (DbType = Int32), @p228='?', @p229='?', @p230='?', @p231='?' (DbType = Decimal), @p232='?', @p233='?' (DbType = Decimal), @p234='?', @p235='?', @p236='?' (DbType = Int32), @p237='?' (DbType = Int32), @p238='?' (DbType = DateTime), @p239='?' (DbType = Decimal), @p240='?', @p241='?' (DbType = Double), @p242='?' (DbType = Boolean), @p243='?' (DbType = Boolean), @p244='?' (DbType = Int32), @p245='?' (DbType = Int32), @p246='?' (DbType = Boolean), @p247='?', @p248='?' (DbType = Decimal), @p249='?' (DbType = Double), @p250='?', @p251='?', @p252='?' (DbType = DateTime), @p253='?' (DbType = DateTime), @p281='?' (DbType = Int32), @p255='?', @p256='?', @p257='?', @p258='?' (DbType = Decimal), @p259='?', @p260='?' (DbType = Decimal), @p261='?', @p262='?', @p263='?' (DbType = Int32), @p264='?' (DbType = Int32), @p265='?' (DbType = DateTime), @p266='?' (DbType = Decimal), @p267='?', @p268='?' (DbType = Double), @p269='?' (DbType = Boolean), @p270='?' (DbType = Boolean), @p271='?' (DbType = Int32), @p272='?' (DbType = Int32), @p273='?' (DbType = Boolean), @p274='?', @p275='?' (DbType = Decimal), @p276='?' (DbType = Double), @p277='?', @p278='?', @p279='?' (DbType = DateTime), @p280='?' (DbType = DateTime), @p308='?' (DbType = Int32), @p282='?', @p283='?', @p284='?', @p285='?' (DbType = Decimal), @p286='?', @p287='?' (DbType = Decimal), @p288='?', @p289='?', @p290='?' (DbType = Int32), @p291='?' (DbType = Int32), @p292='?' (DbType = DateTime), @p293='?' (DbType = Decimal), @p294='?', @p295='?' (DbType = Double), @p296='?' (DbType = Boolean), @p297='?' (DbType = Boolean), @p298='?' (DbType = Int32), @p299='?' (DbType = Int32), @p300='?' (DbType = Boolean), @p301='?', @p302='?' (DbType = Decimal), @p303='?' (DbType = Double), @p304='?', @p305='?', @p306='?' (DbType = DateTime), @p307='?' (DbType = DateTime), @p335='?' (DbType = Int32), @p309='?', @p310='?', @p311='?', @p312='?' (DbType = Decimal), @p313='?', @p314='?' (DbType = Decimal), @p315='?', @p316='?', @p317='?' (DbType = Int32), @p318='?' (DbType = Int32), @p319='?' (DbType = DateTime), @p320='?' (DbType = Decimal), @p321='?', @p322='?' (DbType = Double), @p323='?' (DbType = Boolean), @p324='?' (DbType = Boolean), @p325='?' (DbType = Int32), @p326='?' (DbType = Int32), @p327='?' (DbType = Boolean), @p328='?', @p329='?' (DbType = Decimal), @p330='?' (DbType = Double), @p331='?', @p332='?', @p333='?' (DbType = DateTime), @p334='?' (DbType = DateTime), @p362='?' (DbType = Int32), @p336='?', @p337='?', @p338='?', @p339='?' (DbType = Decimal), @p340='?', @p341='?' (DbType = Decimal), @p342='?', @p343='?', @p344='?' (DbType = Int32), @p345='?' (DbType = Int32), @p346='?' (DbType = DateTime), @p347='?' (DbType = Decimal), @p348='?', @p349='?' (DbType = Double), @p350='?' (DbType = Boolean), @p351='?' (DbType = Boolean), @p352='?' (DbType = Int32), @p353='?' (DbType = Int32), @p354='?' (DbType = Boolean), @p355='?', @p356='?' (DbType = Decimal), @p357='?' (DbType = Double), @p358='?', @p359='?', @p360='?' (DbType = DateTime), @p361='?' (DbType = DateTime), @p389='?' (DbType = Int32), @p363='?', @p364='?', @p365='?', @p366='?' (DbType = Decimal), @p367='?', @p368='?' (DbType = Decimal), @p369='?', @p370='?', @p371='?' (DbType = Int32), @p372='?' (DbType = Int32), @p373='?' (DbType = DateTime), @p374='?' (DbType = Decimal), @p375='?', @p376='?' (DbType = Double), @p377='?' (DbType = Boolean), @p378='?' (DbType = Boolean), @p379='?' (DbType = Int32), @p380='?' (DbType = Int32), @p381='?' (DbType = Boolean), @p382='?', @p383='?' (DbType = Decimal), @p384='?' (DbType = Double), @p385='?', @p386='?', @p387='?' (DbType = DateTime), @p388='?' (DbType = DateTime)], CommandType='"Text"', CommandTimeout='30'] INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p0, @p1, @p2, @p3) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p4, @p5, @p6, @p7) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p8, @p9, @p10, @p11) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p12, @p13, @p14, @p15) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p16, @p17, @p18, @p19) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p20, @p21, @p22, @p23) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p24, @p25, @p26, @p27) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p28, @p29, @p30, @p31) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p32, @p33, @p34, @p35) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p36, @p37, @p38, @p39) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p40, @p41, @p42, @p43) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p44, @p45, @p46, @p47) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p48, @p49, @p50, @p51) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p52, @p53, @p54, @p55) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p56, @p57, @p58, @p59) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p60, @p61, @p62, @p63) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p64, @p65, @p66, @p67) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p68, @p69, @p70, @p71) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p72, @p73, @p74, @p75) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p76, @p77, @p78, @p79) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p80, @p81, @p82, @p83) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p84, @p85, @p86, @p87) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p88, @p89, @p90, @p91) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p92, @p93, @p94, @p95) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p96, @p97, @p98, @p99) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p100, @p101, @p102, @p103) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p104, @p105, @p106, @p107) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p108, @p109, @p110, @p111) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p112, @p113, @p114, @p115) RETURNING "Id"; INSERT INTO "BalanceDeductionsHistories" ("CreateTime", "FlatId", "Sum", "UpdatedBalance") VALUES (@p116, @p117, @p118, @p119) RETURNING "Id"; UPDATE "Flats" SET "AccountNumber" = @p120, "AccountNumber2" = @p121, "AccountNumber3" = @p122, "AdminFees" = @p123, "Apartment" = @p124, "Balance" = @p125, "Building" = @p126, "City" = @p127, "CountParkingSpots" = @p128, "CountRooms" = @p129, "CreateTime" = @p130, "Deposit" = @p131, "Description" = @p132, "Floor" = @p133, "HasBalcony" = @p134, "HasTerrace" = @p135, "InternalId" = @p136, "LandlordId" = @p137, "PetAllowed" = @p138, "Postcode" = @p139, "Price" = @p140, "Size" = @p141, "Street" = @p142, "Title" = @p143, "UpdateTime" = @p144, "YearBuilt" = @p145 WHERE "Id" = @p146; UPDATE "Flats" SET "AccountNumber" = @p147, "AccountNumber2" = @p148, "AccountNumber3" = @p149, "AdminFees" = @p150, "Apartment" = @p151, "Balance" = @p152, "Building" = @p153, "City" = @p154, "CountParkingSpots" = @p155, "CountRooms" = @p156, "CreateTime" = @p157, "Deposit" = @p158, "Description" = @p159, "Floor" = @p160, "HasBalcony" = @p161, "HasTerrace" = @p162, "InternalId" = @p163, "LandlordId" = @p164, "PetAllowed" = @p165, "Postcode" = @p166, "Price" = @p167, "Size" = @p168, "Street" = @p169, "Title" = @p170, "UpdateTime" = @p171, "YearBuilt" = @p172 WHERE "Id" = @p173; UPDATE "Flats" SET "AccountNumber" = @p174, "AccountNumber2" = @p175, "AccountNumber3" = @p176, "AdminFees" = @p177, "Apartment" = @p178, "Balance" = @p179, "Building" = @p180, "City" = @p181, "CountParkingSpots" = @p182, "CountRooms" = @p183, "CreateTime" = @p184, "Deposit" = @p185, "Description" = @p186, "Floor" = @p187, "HasBalcony" = @p188, "HasTerrace" = @p189, "InternalId" = @p190, "LandlordId" = @p191, "PetAllowed" = @p192, "Postcode" = @p193, "Price" = @p194, "Size" = @p195, "Street" = @p196, "Title" = @p197, "UpdateTime" = @p198, "YearBuilt" = @p199 WHERE "Id" = @p200; UPDATE "Flats" SET "AccountNumber" = @p201, "AccountNumber2" = @p202, "AccountNumber3" = @p203, "AdminFees" = @p204, "Apartment" = @p205, "Balance" = @p206, "Building" = @p207, "City" = @p208, "CountParkingSpots" = @p209, "CountRooms" = @p210, "CreateTime" = @p211, "Deposit" = @p212, "Description" = @p213, "Floor" = @p214, "HasBalcony" = @p215, "HasTerrace" = @p216, "InternalId" = @p217, "LandlordId" = @p218, "PetAllowed" = @p219, "Postcode" = @p220, "Price" = @p221, "Size" = @p222, "Street" = @p223, "Title" = @p224, "UpdateTime" = @p225, "YearBuilt" = @p226 WHERE "Id" = @p227; UPDATE "Flats" SET "AccountNumber" = @p228, "AccountNumber2" = @p229, "AccountNumber3" = @p230, "AdminFees" = @p231, "Apartment" = @p232, "Balance" = @p233, "Building" = @p234, "City" = @p235, "CountParkingSpots" = @p236, "CountRooms" = @p237, "CreateTime" = @p238, "Deposit" = @p239, "Description" = @p240, "Floor" = @p241, "HasBalcony" = @p242, "HasTerrace" = @p243, "InternalId" = @p244, "LandlordId" = @p245, "PetAllowed" = @p246, "Postcode" = @p247, "Price" = @p248, "Size" = @p249, "Street" = @p250, "Title" = @p251, "UpdateTime" = @p252, "YearBuilt" = @p253 WHERE "Id" = @p254; UPDATE "Flats" SET "AccountNumber" = @p255, "AccountNumber2" = @p256, "AccountNumber3" = @p257, "AdminFees" = @p258, "Apartment" = @p259, "Balance" = @p260, "Building" = @p261, "City" = @p262, "CountParkingSpots" = @p263, "CountRooms" = @p264, "CreateTime" = @p265, "Deposit" = @p266, "Description" = @p267, "Floor" = @p268, "HasBalcony" = @p269, "HasTerrace" = @p270, "InternalId" = @p271, "LandlordId" = @p272, "PetAllowed" = @p273, "Postcode" = @p274, "Price" = @p275, "Size" = @p276, "Street" = @p277, "Title" = @p278, "UpdateTime" = @p279, "YearBuilt" = @p280 WHERE "Id" = @p281; UPDATE "Flats" SET "AccountNumber" = @p282, "AccountNumber2" = @p283, "AccountNumber3" = @p284, "AdminFees" = @p285, "Apartment" = @p286, "Balance" = @p287, "Building" = @p288, "City" = @p289, "CountParkingSpots" = @p290, "CountRooms" = @p291, "CreateTime" = @p292, "Deposit" = @p293, "Description" = @p294, "Floor" = @p295, "HasBalcony" = @p296, "HasTerrace" = @p297, "InternalId" = @p298, "LandlordId" = @p299, "PetAllowed" = @p300, "Postcode" = @p301, "Price" = @p302, "Size" = @p303, "Street" = @p304, "Title" = @p305, "UpdateTime" = @p306, "YearBuilt" = @p307 WHERE "Id" = @p308; UPDATE "Flats" SET "AccountNumber" = @p309, "AccountNumber2" = @p310, "AccountNumber3" = @p311, "AdminFees" = @p312, "Apartment" = @p313, "Balance" = @p314, "Building" = @p315, "City" = @p316, "CountParkingSpots" = @p317, "CountRooms" = @p318, "CreateTime" = @p319, "Deposit" = @p320, "Description" = @p321, "Floor" = @p322, "HasBalcony" = @p323, "HasTerrace" = @p324, "InternalId" = @p325, "LandlordId" = @p326, "PetAllowed" = @p327, "Postcode" = @p328, "Price" = @p329, "Size" = @p330, "Street" = @p331, "Title" = @p332, "UpdateTime" = @p333, "YearBuilt" = @p334 WHERE "Id" = @p335; UPDATE "Flats" SET "AccountNumber" = @p336, "AccountNumber2" = @p337, "AccountNumber3" = @p338, "AdminFees" = @p339, "Apartment" = @p340, "Balance" = @p341, "Building" = @p342, "City" = @p343, "CountParkingSpots" = @p344, "CountRooms" = @p345, "CreateTime" = @p346, "Deposit" = @p347, "Description" = @p348, "Floor" = @p349, "HasBalcony" = @p350, "HasTerrace" = @p351, "InternalId" = @p352, "LandlordId" = @p353, "PetAllowed" = @p354, "Postcode" = @p355, "Price" = @p356, "Size" = @p357, "Street" = @p358, "Title" = @p359, "UpdateTime" = @p360, "YearBuilt" = @p361 WHERE "Id" = @p362; UPDATE "Flats" SET "AccountNumber" = @p363, "AccountNumber2" = @p364, "AccountNumber3" = @p365, "AdminFees" = @p366, "Apartment" = @p367, "Balance" = @p368, "Building" = @p369, "City" = @p370, "CountParkingSpots" = @p371, "CountRooms" = @p372, "CreateTime" = @p373, "Deposit" = @p374, "Description" = @p375, "Floor" = @p376, "HasBalcony" = @p377, "HasTerrace" = @p378, "InternalId" = @p379, "LandlordId" = @p380, "PetAllowed" = @p381, "Postcode" = @p382, "Price" = @p383, "Size" = @p384, "Street" = @p385, "Title" = @p386, "UpdateTime" = @p387, "YearBuilt" = @p388 WHERE "Id" = @p389; [2025-04-30 21:00:02 ERR] An exception occurred in the database while saving changes for context type 'DAL.EF.EFDbContext'. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. at Npgsql.Internal.NpgsqlConnector.g__ReadMessageLong|223_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) Exception data: Severity: ERROR SqlState: 23502 MessageText: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. SchemaName: public TableName: BalanceDeductionsHistories ColumnName: Id File: execMain.c Line: 1968 Routine: ExecConstraints --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. at Npgsql.Internal.NpgsqlConnector.g__ReadMessageLong|223_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) Exception data: Severity: ERROR SqlState: 23502 MessageText: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. SchemaName: public TableName: BalanceDeductionsHistories ColumnName: Id File: execMain.c Line: 1968 Routine: ExecConstraints --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) [2025-04-30 21:00:02 ERR] Fatal error. Attempt 3 out of 3. Error description: An error occurred while saving the entity changes. See the inner exception for details. [2025-04-30 21:00:02 ERR] Job Group1.MonthlyChargeJob threw an unhandled Exception: Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. at Npgsql.Internal.NpgsqlConnector.g__ReadMessageLong|223_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) Exception data: Severity: ERROR SqlState: 23502 MessageText: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. SchemaName: public TableName: BalanceDeductionsHistories ColumnName: Id File: execMain.c Line: 1968 Routine: ExecConstraints --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at DAL.Repositories.UnitOfWork.CommitAsync() in /Users/vhdk/RiderProjects/HMGT/DAL/Repositories/UnitOfWork.cs:line 265 at DAL.Repositories.UnitOfWork.CommitAsync() in /Users/vhdk/RiderProjects/HMGT/DAL/Repositories/UnitOfWork.cs:line 272 at BLL.Services.ExpensesService.ProcessBatchAsync(List`1 flats) in /Users/vhdk/RiderProjects/HMGT/BLL/Services/ExpensesService.cs:line 303 at BLL.Services.ExpensesService.ProcessBatchAsync(List`1 flats) in /Users/vhdk/RiderProjects/HMGT/BLL/Services/ExpensesService.cs:line 313 at BLL.Services.ExpensesService.MonthlyCharge() in /Users/vhdk/RiderProjects/HMGT/BLL/Services/ExpensesService.cs:line 255 at API.Infrastructure.Quartz.Jobs.MonthlyChargeJob.Execute(IJobExecutionContext context) in /Users/vhdk/RiderProjects/HMGT/Web/Infrastructure/Quartz/Jobs/MonthlyChargeJob.cs:line 21 at Quartz.Core.JobRunShell.Run(CancellationToken cancellationToken) [2025-04-30 21:00:02 ERR] Job Group1.MonthlyChargeJob threw an exception. Quartz.SchedulerException: Job threw an unhandled exception. ---> Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. at Npgsql.Internal.NpgsqlConnector.g__ReadMessageLong|223_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) Exception data: Severity: ERROR SqlState: 23502 MessageText: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. SchemaName: public TableName: BalanceDeductionsHistories ColumnName: Id File: execMain.c Line: 1968 Routine: ExecConstraints --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at DAL.Repositories.UnitOfWork.CommitAsync() in /Users/vhdk/RiderProjects/HMGT/DAL/Repositories/UnitOfWork.cs:line 265 at DAL.Repositories.UnitOfWork.CommitAsync() in /Users/vhdk/RiderProjects/HMGT/DAL/Repositories/UnitOfWork.cs:line 272 at BLL.Services.ExpensesService.ProcessBatchAsync(List`1 flats) in /Users/vhdk/RiderProjects/HMGT/BLL/Services/ExpensesService.cs:line 303 at BLL.Services.ExpensesService.ProcessBatchAsync(List`1 flats) in /Users/vhdk/RiderProjects/HMGT/BLL/Services/ExpensesService.cs:line 313 at BLL.Services.ExpensesService.MonthlyCharge() in /Users/vhdk/RiderProjects/HMGT/BLL/Services/ExpensesService.cs:line 255 at API.Infrastructure.Quartz.Jobs.MonthlyChargeJob.Execute(IJobExecutionContext context) in /Users/vhdk/RiderProjects/HMGT/Web/Infrastructure/Quartz/Jobs/MonthlyChargeJob.cs:line 21 at Quartz.Core.JobRunShell.Run(CancellationToken cancellationToken) --- End of inner exception stack trace --- [See nested exception: Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. at Npgsql.Internal.NpgsqlConnector.g__ReadMessageLong|223_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) Exception data: Severity: ERROR SqlState: 23502 MessageText: null value in column "Id" of relation "BalanceDeductionsHistories" violates not-null constraint Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. SchemaName: public TableName: BalanceDeductionsHistories ColumnName: Id File: execMain.c Line: 1968 Routine: ExecConstraints --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at DAL.Repositories.UnitOfWork.CommitAsync() in /Users/vhdk/RiderProjects/HMGT/DAL/Repositories/UnitOfWork.cs:line 265 at DAL.Repositories.UnitOfWork.CommitAsync() in /Users/vhdk/RiderProjects/HMGT/DAL/Repositories/UnitOfWork.cs:line 272 at BLL.Services.ExpensesService.ProcessBatchAsync(List`1 flats) in /Users/vhdk/RiderProjects/HMGT/BLL/Services/ExpensesService.cs:line 303 at BLL.Services.ExpensesService.ProcessBatchAsync(List`1 flats) in /Users/vhdk/RiderProjects/HMGT/BLL/Services/ExpensesService.cs:line 313 at BLL.Services.ExpensesService.MonthlyCharge() in /Users/vhdk/RiderProjects/HMGT/BLL/Services/ExpensesService.cs:line 255 at API.Infrastructure.Quartz.Jobs.MonthlyChargeJob.Execute(IJobExecutionContext context) in /Users/vhdk/RiderProjects/HMGT/Web/Infrastructure/Quartz/Jobs/MonthlyChargeJob.cs:line 21 at Quartz.Core.JobRunShell.Run(CancellationToken cancellationToken)]