public async Task RemovedAsync(string workAddress)
        {
            var workDocument = new WorkDocument();

            workDocument.Address = workAddress;
            await BatchUpdateAsync(null, null, new[] { workDocument });
        }
        public async Task UpsertAsync(params MusicRecordingDTO[] works)
        {
            var workDocuments = new List <WorkDocument>();

            if (works != null)
            {
                foreach (var work in works)
                {
                    var workDocument = new WorkDocument();
                    workDocument.Address                      = work.Address.ToLower();
                    workDocument.Image                        = work.Image;
                    workDocument.ArtistAddress                = LowerCaseIfNotNull(work.ByArtistAddress);
                    workDocument.ArtistName                   = work.ArtistName;
                    workDocument.Genre                        = work.Genre;
                    workDocument.Name                         = work.Name;
                    workDocument.Audio                        = work.Audio;
                    workDocument.PerformingArtists            = GetArtistsPipeDelimeted(work.GetPerformingArtists());
                    workDocument.PerformingArtistsNames       = GetArtistsNames(work.GetPerformingArtists());
                    workDocument.PerformingArtistsAddresses   = GetArtistsAddresses(work.GetPerformingArtists());
                    workDocument.ContributingArtists          = GetArtistsPipeDelimeted(work.GetContributingArtists());
                    workDocument.ContributingArtistsNames     = GetArtistsNames(work.GetContributingArtists());
                    workDocument.ContributingArtistsAddresses = GetArtistsAddresses(work.GetContributingArtists());
                    workDocument.FeaturedArtists              = GetArtistsPipeDelimeted(work.GetFeaturedArtists());
                    workDocument.FeaturedArtistsNames         = GetArtistsNames(work.GetFeaturedArtists());
                    workDocument.FeaturedArtistsAddresses     = GetArtistsAddresses(work.GetFeaturedArtists());
                    //workDocument.dateCreated = work.dateCreated ?? "";
                    // workDocument.dateModified = work.dateModified ?? "";
                    workDocument.Label            = work.Label ?? "";
                    workDocument.Description      = work.Description ?? "";
                    workDocument.Publisher        = work.Publisher ?? "";
                    workDocument.HasPartOf        = work.HasPart ?? false;
                    workDocument.IsPartOf         = work.IsPartOf ?? false;
                    workDocument.IsFamilyFriendly = work.IsFamilyFriendly;
                    workDocument.License          = work.License ?? "";
                    workDocument.IswcCode         = work.IswcCode ?? "";

                    var keyWords = new List <string>();
                    keyWords.Add(work.Genre);

                    if (!string.IsNullOrEmpty(work.Keywords))
                    {
                        keyWords.AddRange(work.Keywords.Split(','));
                    }

                    workDocument.Keywords = keyWords.ToArray();

                    workDocuments.Add(workDocument);
                }
            }
            await BatchUpdateAsync(workDocuments.ToArray());
        }