Exemple #1
0
        public async Task <IActionResult> AddBureau(Bureau bureau)
        {
            bureau = _organizationService.AddBureau(bureau);

            var identity = (ClaimsIdentity)User.Identity;
            await _auditLog.Append(identity.GetClaimAsInt("EmployeeId"), LogActionType.Create, LogResourceType.Bureau, bureau.BureauId,
                                   $"{identity.GetClaim(ClaimTypes.Name)} created bureau with id {bureau.BureauId}");

            return(RedirectToAction(nameof(ViewBureau), new { id = bureau.BureauId }));
        }