Open Koushiq opened 1 year ago
I agree that having a branch showing this would be good (the older version could be kept as a separate branch). For now: you can find an example in the "Twelve Days of Code" solution (the "import gists" project): https://github.com/M-Files/TwelveDaysOfCode
I lied. This approach uses another approach. This sample is currently missing. I can add it to our backlog.
please provide example with column mapping
I'm not sure exactly what you're after, @Koushiq. You don't provide a column mapping in an external object type data source. Instead you expose the columns that the data source has, and the user then creates the column mapping when configuring the connection in their vault. This is because the configuration of each vault can differ drastically, so there's no way for your connector to know beforehand how it should be mapped.
To declare the available columns you should return them from DataSourceConnection.GetAvailableColumns
, something like this:
public partial class DataSourceConnection
{
public override List<ColumnDefinition> GetAvailableColumns()
{
var columns = new List<ColumnDefinition>();
// TODO: add columns
return columns;
}
}
The csproj provided in this repository does not matches the newer (M-Files External Object Type Data Source (beta) ) could you provide one sample which includes column mapping