skip to Main Content

Visual Studio 2022 not running XUnit tests – Asp.net

I've created a EntityFramework ASP.NET solution and i'm trying to create a XUnit test project to test my differents classes i've created. I've created a TestClass for my Activity Class : using LADS_Model; using LADS_WebUI.Controllers; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Collections.Generic; using…

VIEW QUESTION

The expression is invalid inside an 'Include' operation, since it does not represent a property access: – Asp.net

Controller: [HttpGet] [Route("MIDKalorimetar/Delete/{Id}/{Id2}/{Id3}/{Id4}/{Id5}")] public async Task<IActionResult> Delete(DeleteKalorimetarVM modelVM) { var model = await _db.ParametriMjerila.Where(x => x.Id == modelVM.Id).Include(d => d.Id == modelVM.Id2).Include(x=>x.Id == modelVM.Id3).Include(x => x.Id == modelVM.Id4).Include(x => x.Id == modelVM.Id5).FirstOrDefaultAsync(); return PartialView("Delete", model); } [HttpPost] public async Task<IActionResult>…

VIEW QUESTION

.NET API threading issue (DBContext) – Asp.net

I am implementing an API and as part of it I have setup a custom .Net Middleware service extension UseRequestLoggingModdlewareExtension() that it run between the following: app.UseHttpsRedirection(); app.UseRequestLoggingModdlewareExtension(); app.UseRouting(); The code is simple, and just logs the output of the…

VIEW QUESTION
Back To Top
Search