예제 #1
0
        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
            });
        }
예제 #2
0
 public Session_Location Add(Session_Location sessionLocation)
 {
     context.Session_Location_Pairs.Add(sessionLocation);
     context.SaveChanges();
     return(sessionLocation);
 }