private static void AddRoleToArtist(ArtistDetail artistDetail, ArtistDTO artist)
        {
            var role = artistDetail.Instrument1;

            var instrument = new InstrumentDTO(role);
            var artistInstrument = artist.artistInstruments.FirstOrDefault(i => i.Instrument1 == instrument.Instrument1);

            if (artistInstrument == null)
            {
                artistInstrument = instrument;
                artist.artistInstruments.Add(artistInstrument);
            }
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the ArtistDetails EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToArtistDetails(ArtistDetail artistDetail)
 {
     base.AddObject("ArtistDetails", artistDetail);
 }
        public static ArtistDetail GetArtistDetailByID(int artistDetailId)
        {
            var artistDetail = BsoArchiveEntities.Current.ArtistDetails.FirstOrDefault(ad => ad.ArtistDetailID == artistDetailId) ?? ArtistDetail.NewArtistDetail();

            return(artistDetail);
        }
 /// <summary>
 /// Create a new ArtistDetail object.
 /// </summary>
 /// <param name="ensembleType">Initial value of the EnsembleType property.</param>
 /// <param name="eventId">Initial value of the EventId property.</param>
 /// <param name="eventDate">Initial value of the EventDate property.</param>
 /// <param name="eventStart">Initial value of the EventStart property.</param>
 /// <param name="eventEnd">Initial value of the EventEnd property.</param>
 /// <param name="artistDetailID">Initial value of the ArtistDetailID property.</param>
 public static ArtistDetail CreateArtistDetail(global::System.String ensembleType, global::System.Int32 eventId, global::System.DateTime eventDate, global::System.String eventStart, global::System.String eventEnd, global::System.Int32 artistDetailID)
 {
     ArtistDetail artistDetail = new ArtistDetail();
     artistDetail.EnsembleType = ensembleType;
     artistDetail.EventId = eventId;
     artistDetail.EventDate = eventDate;
     artistDetail.EventStart = eventStart;
     artistDetail.EventEnd = eventEnd;
     artistDetail.ArtistDetailID = artistDetailID;
     return artistDetail;
 }
        public static ArtistDetail NewArtistDetail()
        {
            ArtistDetail newObject = new ArtistDetail();

            BsoArchiveEntities.Current.AddToArtistDetails(newObject);
            BsoArchiveEntities.SetDefaultValue(newObject);
            return newObject;
        }