Mostly I was using this web site for my example.
In my case I have created the project C:\projects\ReverseGeoCoding, then open PowerShell, and first, if you don't have EF tool installed, execute following:
dotnet tool install --global dotnet-ef
Go to project folder, like cd "C:\projects\ReverseGeoCoding", and add packages "Microsoft.EntityFrameworkCore.Design" and "MySql.EntityFrameworkCore" like:
I had to add package "Microsoft.EntityFrameworkCore.Design", and I had to reference my "ReverseGeoCoding" project, here is how my "EFCore.csproj" look like:
Dictionary<string, string> myDict = new Dictionary<string, string>();
XElement myXML = XElement.Load("xml.xml");
IEnumerable<XElement> xElementData = from data in myXML.Descendants("data") select data;
foreach (XElement xElement in xElementData)
{
myDict[(string)xElement.Elements().ElementAt(0)] = (string)xElement.Elements().ElementAt(1);
}
foreach (KeyValuePair<string, string> keyValuePair in myDict)
{
Console.WriteLine($"Key: {keyValuePair.Key}, value: {keyValuePair.Value}");
}
Console.WriteLine("Press any key");
Console.ReadKey();
POI:
IEnumerable<XElement> xElementData = from data in myXML.Descendants("data") select data;
foreach (XElement xElement in xElementData)
{
myDict[(string)xElement.Elements().ElementAt(0)] = (string)xElement.Elements().ElementAt(1);
}