Address error IDE0270 after MsBuild update (#1865)

This commit is contained in:
Cheena Malhotra
2023-02-16 16:15:30 -08:00
committed by GitHub
parent 0f82062502
commit 74dd15c868
14 changed files with 27 additions and 106 deletions

View File

@@ -454,11 +454,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Security
this.originalState = original;
this.exists = !context.IsNewObject;
Database? parent = context.Server.GetSmoObject(new Urn(context.ParentUrn)) as Database;
if (parent == null)
{
throw new ArgumentException("Context ParentUrn is invalid");
}
Database? parent = context.Server.GetSmoObject(new Urn(context.ParentUrn)) as Database ?? throw new ArgumentException("Context ParentUrn is invalid");
this.parent = parent;
this.roleNames = this.PopulateRoles();