skip to Main Content

Returning a Task in app.GetMap() function – Asp.net

I'm trying to write a simple string from the user-agent request headers in to the browser. var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); app.MapGet("/", (context) => return context.Request.Headers["User-Agent"].ToString();); app.Run(); This gives a compile error Cannot convert expression type 'string'…

VIEW QUESTION

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
Back To Top
Search