public void AddTest() { var random = new Random(); Session = SessionService.GetAllSessions()[random.Next(100)]; Location = LocationService.GetAllLocations()[random.Next(100)]; SessionLocation = SessionLocationService.Add(new Session_Location() { Session = Session, SessionId = Session.Id, Location = Location, LocationId = Location.Id }); }
public Session_Location Add(Session_Location sessionLocation) { context.Session_Location_Pairs.Add(sessionLocation); context.SaveChanges(); return(sessionLocation); }