Skip to content

Instantly share code, notes, and snippets.

@ekarlso
Created October 11, 2017 20:52
Show Gist options
  • Save ekarlso/433a59a1e106c4b93c4df5b778cfef93 to your computer and use it in GitHub Desktop.
Save ekarlso/433a59a1e106c4b93c4df5b778cfef93 to your computer and use it in GitHub Desktop.
public async Task<IEnumerable<Integration>> GetAllWithSettings()
{
var refs = await IntegrationContext.Set<IntegrationConfig>().Include(i => i.Settings).ToListAsync();
var data = new List<Integration>();
foreach (var i in refs)
{
var integration = new Integration
{
Id = i.Id,
Name = i.Name,
Settings = i.Settings.ToDictionary(x => x.Key, x => x.Value)
};
data.Append(integration);
}
return data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment