Example #1
0
 private WhaleSighting Convert(WhaleSightingDTO whaleSighting)
 {
     return(new WhaleSighting()
     {
         Name = whaleSighting.Name,
         Species = whaleSighting.Species,
         Latitude = whaleSighting.Latitude,
         Longitude = whaleSighting.Longitude,
         Time = whaleSighting.Time,
     });
 }
Example #2
0
        public void UpdateWhale(WhaleSightingDTO whaleSighting)
        {
            WhaleSighting whaleSightingEntity = new WhaleSighting()
            {
                Name      = whaleSighting.Name,
                Species   = whaleSighting.Species,
                Latitude  = whaleSighting.Latitude,
                Longitude = whaleSighting.Longitude,
                Time      = whaleSighting.Time
            };

            _whaleSightingManagementService.UpdateWhaleSighting(whaleSightingEntity);
        }
Example #3
0
        public void AddWhale(WhaleSightingDTO whaleSighting)
        {
            WhaleSighting sightingEntity = Convert(whaleSighting);

            _whaleSightingManagementService.AddSighting(sightingEntity);
        }