Base solution for your next web application
Open Closed

About RegisterToChanges method in AbpDbContext #1404


User avatar
0
nmtoan07 created

I don't know why we have RegisterToChanges method. I saw we code in this method for handle ObjectStateManagerChanged and update Audit fields. But I think maybe it was duplicated wth SaveChanges? Please explain for me.

Thanks,


1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    It used to set CreationTime, CreatorUser and GUID Id values without need to SaveChanges. This can espcially useful if you want to need these values after creating an entity and you don't want to call savechanges. Duplication is no problem, the code handles it.