public Event AddContribution(Contribution contribution, Event eventTarget)
 {
     using (SynchronicWorldContext context = new SynchronicWorldContext())
     {
         var contributionInDb = context.Contributions.Where(c => c.Name.ToLower().Equals(contribution.Name.ToLower())).FirstOrDefault();
         var eventInDb = context.Events.Include(e => e.Contributions).Where(e => e.Name.ToLower().Equals(eventTarget.Name.ToLower())).FirstOrDefault();
         if (contributionInDb == null || eventInDb == null)
         {
             return null;
         }
         eventInDb.Contributions.Add(contributionInDb);
         context.SaveChanges();
         return eventInDb;
     }
 }
 public Contribution CreateContribution(Contribution contribution)
 {
     using (SynchronicWorldContext context = new SynchronicWorldContext())
     {
         if (context.Contributions.Where(c => c.Name.ToLower().Equals(contribution.Name.ToLower())).Count() != 0)
         {
             return null;
         }
         var person = contribution.Person;
         contribution.Person = null;
         Contribution newContribution = context.Contributions.Add(contribution);
         var personInDb = context.Persons.Where(p => p.Id.Equals(person.Id)).FirstOrDefault();
         newContribution.Person = personInDb;
         context.SaveChanges();
         return newContribution;
     }
 }