Beispiel #1
0
 public void Update(Appointment entity)
 {
     using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
     {
         _context.Appointments.Update(AppointmentMapper.MapAppointmentEntityToAppointmentPersistence(entity));
         _context.SaveChanges();
     }
 }
Beispiel #2
0
 public void Create(FeedbackEvent entity)
 {
     using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
     {
         _context.FeedbackEvents.Add(EventMapper.MapFeedbackEventEntityToFeedbackEventPersistence(entity));
         _context.SaveChanges();
     }
 }
 public void Update(Feedback entity)
 {
     using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
     {
         _context.Update(FeedbackMapper.MapFeedbackEntityToFeedbackPersistence(entity));
         _context.SaveChanges();
     }
 }
Beispiel #4
0
 public void Update(Allergen entity)
 {
     using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
     {
         _context.Update(AllergenMapper.MapAllergenEntityToAllergenPersistence(entity));
         _context.SaveChanges();
     }
 }
 public void Create(ScheduleEvent entity)
 {
     using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
     {
         _context.ScheduleEvents.Add(EventMapper.MapScheduleEventEntityToScheduleEventPersistence(entity));
         _context.SaveChanges();
     }
 }
Beispiel #6
0
 public void Create(User entity)
 {
     using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
     {
         // _context.Users.Add(UserMapper.MapUserEntityToUserPersistence(entity));
         _context.SaveChanges();
     }
 }
        public bool Delete(Guid id)
        {
            using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
            {
                FeedbackPersistence feedback = _context.Feedbacks.Find(id);
                if (feedback == null)
                {
                    return(false);
                }

                _context.Feedbacks.Remove(feedback);
                _context.SaveChanges();
                return(true);
            }
        }
Beispiel #8
0
        public bool Delete(Guid id)
        {
            using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
            {
                AllergenPersistence allergen = _context.Allergens.Find(id);
                if (allergen == null)
                {
                    return(false);
                }

                _context.Allergens.Remove(allergen);
                _context.SaveChanges();
                return(true);
            }
        }