partial void UpdateDistanceUnit(DistanceUnit instance);
 partial void DeleteDistanceUnit(DistanceUnit instance);
 partial void InsertDistanceUnit(DistanceUnit instance);
 public double? GetMinSecondsPerUnit(ExerciseType exerciseType, DistanceUnit distanceUnit)
 {
     if (exerciseType.HasDistanceData != 'Y') return null;
     return GetDistanceInUnits(distanceUnit, (double)exerciseType.MinSecondsPerMile.Value);
 }
 public double GetDistanceInUnits(DistanceUnit distanceUnit, double distanceInMiles)
 {
     return distanceInMiles * distanceUnit.UnitsPerMile;
 }
 public void Delete(DistanceUnit distanceUnit)
 {
     DataContext.DistanceUnits.DeleteOnSubmit(distanceUnit);
 }
 //
 // Insert/Delete Methods
 public void Add(DistanceUnit distanceUnit)
 {
     DataContext.DistanceUnits.InsertOnSubmit(distanceUnit);
 }