public void Edit(DomainClasses.SlideShowItem slideShowItem)
        {
            _slideShowItems.Attach(slideShowItem);

            _dbContext.Entry(slideShowItem).State = EntityState.Modified;

        }
        public void Edit(DomainClasses.TechnicalStaffRole technicalStaffRole)
        {
            _technicalStaffRoles.Attach(technicalStaffRole);

            _dbContext.Entry(technicalStaffRole).State = EntityState.Modified;

        }
Beispiel #3
0
 public static Topic FromDomainModel(DomainClasses.Topic domainTopic)
 {
     return new Topic
     {
         Id = domainTopic.TopicId,
         Name = domainTopic.Name,
         Notes = domainTopic.Notes.Select(note => new Note{Id = note.NoteId, Content = note.Content}).ToList(),
         IsShown = domainTopic.IsShown,
     };
 }
Beispiel #4
0
        public void Edit(DomainClasses.User user)
        {
            _users.Attach(user);

            if (!string.IsNullOrEmpty(user.Password))
                _dbContext.Entry(user).Property(u => u.Password).IsModified = true;


            _dbContext.Entry(user).Property(u => u.Email).IsModified = true;
            _dbContext.Entry(user).Property(u => u.FirstName).IsModified = true;
            _dbContext.Entry(user).Property(u => u.LastName).IsModified = true;
            _dbContext.Entry(user).Property(u => u.Role).IsModified = true;

        }
 public void Add(DomainClasses.TechnicalStaffRole technicalStaffRole)
 {
     _technicalStaffRoles.Add(technicalStaffRole);
 }
Beispiel #6
0
 public SlimTopic(DomainClasses.Topic topic)
 {
     Id = topic.TopicId;
     Name = topic.Name;
     IsShown = topic.IsShown;
 }
 public void Add(DomainClasses.SlideShowItem slideShowItem)
 {
     _slideShowItems.Add(slideShowItem);
 }
Beispiel #8
0
 public void Add(DomainClasses.User user)
 {
     _users.Add(user);
 }
 public void Add(DomainClasses.Announcement announcement)
 {
     _announcements.Add(announcement);
 }