0
leonkosak created
using (_session.Use(desiredTenant.Id, desiredUser.Id)) { //await CreateNewCorrectiveMaintenanceRequest(inputInternal); var output = inputInternal.MapTo<MaintenanceRequest>(); await _maintenanceRequestManager.CreateNewCorrectiveMaintenanceRequestAsync(output); } I can confirm, that desiredUser.Id has non-null value, but the entity in dababase has CreatorUserId null.
Am I missing something?
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
1 Answer(s)
-
0
Try to
SaveChangesin the using code block.using (_session.Use(desiredTenant.Id, desiredUser.Id)) { //await CreateNewCorrectiveMaintenanceRequest(inputInternal); var output = inputInternal.MapTo<MaintenanceRequest>(); await _maintenanceRequestManager.CreateNewCorrectiveMaintenanceRequestAsync(output); CurrentUnitOfWork.SaveChanges(); }Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)