Feature_Directory #90
@ -765,6 +765,14 @@ namespace Marco.Pms.Services.Helpers
|
||||
return ApiResponse<object>.ErrorResponse("Contact not found", "Contact not found", 404);
|
||||
}
|
||||
contact.IsActive = false;
|
||||
|
||||
_context.DirectoryUpdateLogs.Add(new DirectoryUpdateLog
|
||||
{
|
||||
RefereanceId = contact.Id,
|
||||
UpdatedById = LoggedInEmployee.Id,
|
||||
UpdateAt = DateTime.UtcNow
|
||||
});
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
_logger.LogInfo("Contact {ContactId} has been deleted by Employee {Employee}", id, LoggedInEmployee.Id);
|
||||
return ApiResponse<object>.SuccessResponse(new { }, "Contact is deleted Successfully", 200);
|
||||
|
Loading…
x
Reference in New Issue
Block a user