Ends in:
2 DAYS
1 HR
26 MIN
19 SEC
Ends in:
2 D
1 H
26 M
19 S
Open Closed

CreationTime and CreatorId is not inserting in case of InsertManyAsync #6096


User avatar
0
Priyanka created
  • ABP Framework version: vX.X.X
  • UI Type: React
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: There is no exception message
  • Steps to reproduce the issue: Call insert Many

In case of insert using abp, creation time and creator id is updating automatically, but in case of insert many, creator id and creation time is not inserting, as it is get only field, I'm not able to assign any value. Please help me with the solution.


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    ObjectHelper.TrySetProperty(your_entity, x => x.CreatorId, () => CurrentUser.Id);
    ObjectHelper.TrySetProperty(your_entity, x => x.CreationTime, () => Clock.Now);
    
Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35