public void fillDataLocation() { LocationCollection.DeleteMany(it => true); var csvReader = new ReadCsv(); var dataLocation = csvReader.GetDataLocation(); var listLocation = new List <LocationModel>(); foreach (var data in dataLocation) { data.Id = Guid.NewGuid().ToString(); listLocation.Add(data); } LocationCollection.InsertMany(listLocation); }