private List <Snapshot_ComposerOriginalPublisherKnownAs> CastComposerOriginalPublisherKnownAs(
            List <string> knownAsList, int caeNumber)
        {
            var snapshotList = new List <Snapshot_ComposerOriginalPublisherKnownAs>();

            if (knownAsList != null)
            {
                foreach (var knownAs in knownAsList)
                {
                    var snapshot = new Snapshot_ComposerOriginalPublisherKnownAs();
                    snapshot.CloneWriterCaeCode = caeNumber;
                    snapshot.KnownAs            = knownAs;
                    snapshotList.Add(snapshot);
                }
            }
            return(snapshotList);
        }
        public bool DeleteComposerOriginalPublisherKnownAs(Snapshot_ComposerOriginalPublisherKnownAs composerToDelete)
        {
            using (var context = new DataContext())
            {
                var composer =
                    context.Snapshot_ComposerOriginalPublisherKnownAs
                    .Find(composerToDelete.SnapshotComposerOriginalPublisherId);

                context.Snapshot_ComposerOriginalPublisherKnownAs.Attach(composer);
                context.Snapshot_ComposerOriginalPublisherKnownAs.Remove(composer);
                try
                {
                    context.SaveChanges();
                }
                catch (Exception)
                {
                    return(false);
                }
                return(true);
            }
        }
 public Snapshot_ComposerOriginalPublisherKnownAs SaveComposerOriginalPublisherKnownAs(Snapshot_ComposerOriginalPublisherKnownAs composerSnapshot)
 {
     using (var context = new DataContext())
     {
         context.Snapshot_ComposerOriginalPublisherKnownAs.Add(composerSnapshot);
         context.SaveChanges();
         return(composerSnapshot);
     }
 }