Skip to content

Instantly share code, notes, and snippets.

@bjornmicallef
Created December 10, 2020 21:50
Show Gist options
  • Save bjornmicallef/e37f6da967e726c7a191bd54565d3ac7 to your computer and use it in GitHub Desktop.
Save bjornmicallef/e37f6da967e726c7a191bd54565d3ac7 to your computer and use it in GitHub Desktop.
public class UserSettingsService : IUserSettingsService
{
private readonly StockNotificationContext _dbContext;
public UserSettingsService(StockNotificationContext dbContext)
{
_dbContext = dbContext;
}
public async Task<IEnumerable<Seller>> GetSellers()
{
return await _dbContext.tblSellers
.Select(x => new Seller
{
Id = x.Id,
Name = x.Name,
Url = x.Url
})
.ToListAsync();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment