public PersonEvent Insert(PersonEvent personEvent)
        {
            _db.PersonEvents.Add(personEvent);
            _db.SaveChanges();

            return personEvent;
        }
        public PersonEvent Edit(PersonEvent personEvent)
        {
            _db.Entry(personEvent).State = EntityState.Modified;
            _db.SaveChanges();

            return personEvent;
        }
 public static PersonEventDTO PersonEventToDto(PersonEvent personEvent)
 {
     return new PersonEventDTO
     {
         PersonEventId = personEvent.PersonEventId,
         PersonId = personEvent.PersonId,
         EventId = personEvent.EventId,
     };
 }
 public void Remove(PersonEvent personEvent)
 {
     _db.Entry(personEvent).State = EntityState.Deleted;
     _db.SaveChanges();
 }