Update Marco.Pms.Services/Helpers/DirectoryHelper.cs
Added entrie to DirectoryUpdateLog Table
This commit is contained in:
parent
fe5e58dce0
commit
bb561187fb
@ -765,6 +765,14 @@ namespace Marco.Pms.Services.Helpers
|
|||||||
return ApiResponse<object>.ErrorResponse("Contact not found", "Contact not found", 404);
|
return ApiResponse<object>.ErrorResponse("Contact not found", "Contact not found", 404);
|
||||||
}
|
}
|
||||||
contact.IsActive = false;
|
contact.IsActive = false;
|
||||||
|
|
||||||
|
_context.DirectoryUpdateLogs.Add(new DirectoryUpdateLog
|
||||||
|
{
|
||||||
|
RefereanceId = contact.Id,
|
||||||
|
UpdatedById = LoggedInEmployee.Id,
|
||||||
|
UpdateAt = DateTime.UtcNow
|
||||||
|
});
|
||||||
|
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
_logger.LogInfo("Contact {ContactId} has been deleted by Employee {Employee}", id, LoggedInEmployee.Id);
|
_logger.LogInfo("Contact {ContactId} has been deleted by Employee {Employee}", id, LoggedInEmployee.Id);
|
||||||
return ApiResponse<object>.SuccessResponse(new { }, "Contact is deleted Successfully", 200);
|
return ApiResponse<object>.SuccessResponse(new { }, "Contact is deleted Successfully", 200);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user