public static IInitiative ToEntityHead(this InitiativePersist item) { if (item == null) { return(null); } var response = new Initiative(item.Id, item.Name, item.ClientToken, item.OwnerDeveloperName ?? "N/A", new List <IDeveloperRole>(), new List <ApplicationGroup>()); return(response); }
public static IInitiative ToEntity(this InitiativePersist item) { if (item == null) { return(null); } var response = new Initiative(item.Id, item.Name, item.ClientToken, item.OwnerDeveloperName ?? "N/A", item.DeveloperRoles != null ? item.DeveloperRoles.Select(x => ToEntity((DeveloperRolePersist)x)) : new List <IDeveloperRole>(), item.ApplicationGroups.Select(x => x.ToEntity())); return(response); }