コード例 #1
0
        public async Task <IActionResult> Delete([Required] string id)
        {
            var result = await _services.DeleteAsync(id);

            if (result.IsValid)
            {
                await _systemAuditService.AuditAsync(User.GetEmail(), _accessor.GetIp(), Operations.Delete, Tables.CulturalFamily);
            }
            return(Ok(result));
        }
コード例 #2
0
        public async Task <IActionResult> DeleteConfirmed([Required] string hashId, [Required] string hashIdFamily)
        {
            var result = await _services.DeleteAsync(hashId);

            if (result.IsValid)
            {
                await _systemAuditService.AuditAsync(User.GetEmail(), _accessor.GetIp(), Operations.Delete, Tables.CulturalFamily);

                return(RedirectToAction("Index", new { id = hashIdFamily }));
            }
            TempData["ErrorsList"] = result.ErrorsList;
            return(View());
        }