public void BecauseOf() { using (TestDataContext dataContext = new TestDataContext(_connectionString)) { UserDto userDto = new UserDto { DisplayName = "TestUserName", Id = _idToUse, Latitude = 1.0M, Longitude = 1.0M, Email = "*****@*****.**", ZoneId = _currentHotZone, Money = 500, Level = 1, BaseLineEnergy = 15, BaseLineAttackPower = 15, PossibleItemAmount = 5 }; dataContext.UserDtos.InsertOnSubmit(userDto); dataContext.SubmitChanges(); HotZoneDto hotZoneDto = new HotZoneDto { CanStartHere = false, Id = _newHotZoneIdToUse, Latitude = (decimal)_newHotZoneLatitude, Longitude = (decimal)_newHotZoneLongitude, Name = "New Test HotZone" }; dataContext.HotZoneDtos.InsertOnSubmit(hotZoneDto); dataContext.SubmitChanges(); } }
private Guid GivenHotZone(string name) { TestDataContext testDataContext = new TestDataContext(DalTestContextSpecification.ConnectionString); Guid hotZoneId = Guid.NewGuid(); HotZoneDto hotZoneDto = new HotZoneDto { Id = hotZoneId, CanStartHere = false, Latitude = 0, Longitude = 0, Name = name }; _hotZonesIds.Add(hotZoneId); testDataContext.HotZoneDtos.InsertOnSubmit(hotZoneDto); testDataContext.SubmitChanges(); return hotZoneId; }
partial void UpdateHotZoneDto(HotZoneDto instance);
partial void DeleteHotZoneDto(HotZoneDto instance);
partial void InsertHotZoneDto(HotZoneDto instance);