Created
October 11, 2017 20:52
-
-
Save ekarlso/433a59a1e106c4b93c4df5b778cfef93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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