コード例 #1
0
 private void ClearCurrentPicturesFromSpeaker(Speaker speaker)
 {
     var query = repository.Entities.Where(sp => sp.Speaker.Id == speaker.Id);
     foreach (var speakerPicture in query) {
         speakerPicture.CurrentPicture = false;
     }
 }
コード例 #2
0
 private void AddPictureToRepository(Speaker speaker, HttpPostedFileBase picture)
 {
     repository.Add(new SpeakerPicture {
         CurrentPicture = true,
         Speaker = speaker,
         Picture = ReadBytes(picture),
         ContentType = picture.ContentType,
         FileName=picture.FileName
     });
 }
コード例 #3
0
 public static Speaker Create(string salutation, string firstname, string lastname, string email)
 {
     var speaker = new Speaker {
         Id = Guid.NewGuid(),
         Salutation = salutation,
         FirstName = firstname,
         LastName = lastname,
         Contact = {EMail = email}
     };
     return speaker;
 }