public int SetRole(Role role) { _logger.Info($"BLL.{nameof(RoleBll)}.{nameof(SetRole)}: Retention of the role"); if (role.Id != null) { int id = _roleDao.ChangeRole(role); _logger.Info($"BLL.{nameof(RoleBll)}.{nameof(SetRole)}: Role id = {id} changed"); return(id); } else { int id = _roleDao.AddRole(role); _logger.Info($"BLL.{nameof(RoleBll)}.{nameof(SetRole)}: Role id = {id} added"); return(id); } }