skip to Main Content

How to test production mode – Asp.net

I've added a bundler to my ASP.NET Core project. Now I'm using the <environment> tag helpers to reference the bundled files in production mode. <environment exclude="Development"> <link rel="stylesheet" href="~/css/site-bundle.min.css" /> <link rel="stylesheet" href="~/css/layout-bundle.min.css" /> </environment> <environment include="Development"> <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css"…

VIEW QUESTION

ASP.Net Core Error : The JSON value could not be converted to System.String

I am trying to perform a search functionality in Asp.net core, this is my controller [HttpPost("searchbyname")] public async Task<ActionResult<List<SelectedChildDto>>> SearchByName([FromBody]string firstName) { if (string.IsNullOrWhiteSpace(firstName)) { return new List<SelectedChildDto>(); } return await _context.Children .Where(x => x.FirstName.Contains(firstName)) .OrderBy(x => x.FirstName) .Select(x =>…

VIEW QUESTION
Back To Top
Search