I am reading a csv file exported from another system and creating a record in microsoft dynamics crm using C#. However the status is different between the 2 systems so i have to read the statuses from csv and map it to the status in dynamics and use the new while creating the record
What is the best way to achieve this instead of the below switch -
public string MapDEStatusToDynamics(string name) //name is from csv file
{
var primaryStatus=string.Empty;
switch (name)
{
case "Applying for Probate":
primaryStatus = "Applying";
break;
case "Hold Up (Lending/Securities)":
primaryStatus = "Unresolved Lending / Securities";
break;
case "Awaiting POD":
primaryStatus = "Awaiting proof of death";
break;
case "Close Case":
primaryStatus = "Closed";
break;
}
return primaryStatus ; //primary status is text in dynamics
}
Any help would be appreciated.