Ejemplo n.º 1
0
 public static CovidLocationBLDto ToLocationsBLDto(this CovidLocationDADto rec)
 {
     return(new CovidLocationBLDto
     {
         Country = rec.Country,
         State = rec.State,
         Lat = rec.Lat,
         Long = rec.Long
     });
 }
        public void InsertNewLocations(string dbCompositeKey)
        {
            List <CovidLocationDADto> locationRecords = new List <CovidLocationDADto>();

            string[]           keys           = dbCompositeKey.Split('_');
            CovidLocationDADto locationRecord = new CovidLocationDADto
            {
                State   = keys[0],
                Country = keys[1],
                Lat     = Convert.ToDouble(keys[2]),
                Long    = Convert.ToDouble(keys[3])
            };

            locationRecords.Add(locationRecord);
            InsertLocations(Utils.Utilities.MapLocationsDADTOtoBLDTO(locationRecords));
        }