skip to Main Content

How to perform multiple operations concurrently on DbContext? – Asp.net

I have the following background service running: protected override async Task ExecuteAsync(CancellationToken stoppingToken) { await Task.Run(async () => { while (!stoppingToken.IsCancellationRequested) { using (var scope = _scopeFactory.CreateScope()) { DataContext dbContext = scope.ServiceProvider.GetRequiredService<DataContext>(); var tasks = new List<Task>(); tasks.Add(siteA.ProcessSchedule(SportLeagues.MLB, logger, dbContext));…

VIEW QUESTION

A lambda expression with a expression body cannot be converted to an expression tree C# entity framework – Asp.net

I have an entity table with below model public class VulnerabilityImportFileLog { public Collection<Vulnerability> Vulnerability { get; set; } } Trying to return an string value using the select statement in the entity framework query var vulnerabilityImportFileLogSelect = vulnerabilityImportFileLogQuery .Select(vulnerabilityImportFileLog…

VIEW QUESTION
Back To Top
Search