Example #1
0
 private void CreateEventForEachCompany(Company[] companies)
 {
     for (int i = 0; i < companies.Length; i++)
     {
         var @event = new EventInfo()
         {
             CompanyId   = companies[i].Id,
             Name        = "Event " + i,
             Description = "Event description",
             StartDate   = DateTime.Now + new TimeSpan(rnd.Next(4), 0, 0, 0),
             Location    = GetRandomLocation(),
             EndDate     = DateTime.Now.Add(new TimeSpan(10, 5, 45, 0))
         };
         eventService.Add(@event);
     }
 }