Content
Linq query and violation of inserting null in database
Hello All, I have the following two model classes: public partial class EmployeeInfo { public int EmployeeInfoId { get; set; } public string LastName { get; set; } = null!; [DisplayName("First Name")] public string FirstName { get; set; } =…


embedding a pdf file in my chrome browser
I am trying to embed a pdf file on my web page. In order to achieve this, I have the following code in my controller: public IActionResult Index() { string path = Path.Combine(_environment.WebRootPath, "packageFiles"); …


IEnum object True for All
Hi friends, I wonder if there is a way to use TrueForAll for IEnumerable<OrderDetail>? I am trying to check if all of the status = 1 or not. How can I check if all statuses in details are 1 or not? Thank you. var details =…
how to use blazor webassembly in razor pages?
how to use blazor webassembly component in razor pages? if I create Count in webassembly how to use it in razor pages? if I do not open that page do not load dll If I open that page then load it. /Pages/Count.cshtml with component Count If I do not open…
Add-Migration CreateIdentitySchema
Having difficulty with the Add-Migration CreateIdentitySchema step in the tutorial. Any help would be appreciated: Tutorial:…


String interpolation using $ throws System.NullReferenceException on .Net7
We have in my team just upgraded to .net 7 from 6, but we have run into a issues with string interpolation using $"Text {sample}" We are all developing on Intel Macbook Pro's using both Visual Studio or JetBrains Rider. But since the upgrade…


How to query the device twin graph using the built-in `LastUpdatedOn` property from the BasicDigitalTwin?
The BasicDigitalTwin holds a built-in property LastUpdatedOn. As a developer, I want to run a query to find all the stale or fresh twins, example: SELECT * FROM DIGITALTWINS WHERE LastUpdatedOn > '{yesterday}' This query is syntactically correct but…


Layout design for mobile and desktop (width, height and density)
I want to display data tables in an application on mobile as well as in the web browser or on the desktop and I want it to look appropriate. My idea is to show or hide the table columns depending on the width of the screen ( Note: I can open the row…


Max size of System.IO.MemoryStream
Im trying to fetch a .bak file of 3GB size and upload to my blob storage using the SSH.NET package. I get an System.IO.IOException: stream was too long error! I cant find the max size of handeled streams for the System.IO.MemoryStream anywhere. Do…


error when I tried to findBy string in API
Hello, currently, I'm learning Swagger, when I tried to create find by username ,I got the below error [HttpGet] [Route("{fullname:string}")] public async Task<IActionResult> signIn([FromRoute] string…


Best structure for a zero downtime simple ASP .NET / DB web app
This will be a pretty simple app with a lot being read from the DB, display on the web page; submit a web page, write to the DB. With some calls to some standard ML services as part of a query on the DB and evaluate what is submitted. It will be a…


Auth cookie is deleted by the browser when it closes
I have a strange problem. When I close my browser (whether Chrome or MS Edge), my authentication cookie is deleted. Consequently, the next time I start the browser, I have to log in again. My controller looks like this: ClaimsIdentity claimsIdentity =…


BackgroundService - Is it possible to set parameter value?
Hi, I have a background service. I wonder if it is possible to set a parameter to this service from the Blazor Server application or in any other way? Thank you in advance.


JsonConvert System.ArgumentNullException : 'Value cannot be null. Arg_ParamName_Name'
Hi, I tried to do the tree view structure. The code behind is public string TreeViewJSON { get; set; } public void OnGet() { List<TreeViewNode> nodes = new List<TreeViewNode>(); …
Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design Error 6.0 v 7.0
Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design renders following error message: PM> install-package microsoft.VisualStudio.Web.CodeGeneration.Design Restoring packages for…


EF Core 6 - Adding records based on a condition
Hi friends, In my Blazor server application, I am inserting BulkPurchaseRequest records into DB as follows. public class BulkPurchaseRequestsRepository : IBulkPurchaseRequestsRepository { private readonly OyunPalasContext _oyunPalasContext; …
HTTPStatusCode 404 in production only, why?
Hi, What's wrong with my code below, I have tried it in debug mode and got no 404, but if I run it in production (Linux CentOS 8), it fails with 404 (in my case it always fail on pageNo == 2 (there are actually have 20 pages) List<Task> tasks =…
I can't use class on layered architecture
I'm working on a web.api for library otomation project. I'm using layered architecture on project. a485553e-89a6-4fa9-8dd5-1c40de6d40e2.jpg image is my architecture. I couldn't access User.cs class on DataAccess layer. I defined with "usign"…


sslPort in launchsetting.json only works with port 44308 - ASPNETCORE MVC
Below is my launchsettings.json file. When I define sslPort 44308. I am able to browse https://localhost:44308. But if I define any other port let's say "44309". It is not working and browser throwing error stating "This site can't be…


.net upgrade assistant added net7.0-windows for asp.net MVC webapplication during migration
When I used .net upgrade assistant tool convert my webapplication with asp.net MVC with .cshtml views of .net framework 4.8 to migrate to .net 7 then the tool included .net 7-windows as the target framework. this is the same case for projects of type…

