Starts in:
2 DAYS
3 HRS
45 MIN
21 SEC
Starts in:
2 D
3 H
45 M
21 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 November 20, 2024, 13:06