Skip to main content

Questions tagged [.net-7.0]

Use this tag for questions specifically related to version 7.0 of the .NET platform. For questions on .NET Framework generally, use the .net tag.

0 votes
1 answer
29 views

Pass array of objects as params (C# 11)

Edit: I'm stupid :sob: and I didn't actually have all the parameters in the array. Problem nonexistent :D I'm creating an instance of a class that inherits from a class Entity (Monocle.Entity, if that'...
The Mayday Man's user avatar
0 votes
1 answer
34 views

C# ASP.NET Core 7 MVC web application with client certificate on some API calls

I have an ASP.NET Core 7 MVC web application that has full user authentication, but also has a couple of API endpoints. A need has arisen for us to allow authentication on those endpoints using client ...
Simon Parker's user avatar
  • 1,816
0 votes
0 answers
46 views

Entity Framework 7. Cannot insert duplicate key row exception

I'm using Blazor, with Entity Framework 7 to CRUD entities with a code first approach. I have a Position entity as follows [Index(nameof(Barcode), IsUnique = true)] public class Position : ...
Kieran's user avatar
  • 304
0 votes
2 answers
38 views

MudDialog is unresponsive when opened from an external class

I am trying to open a simple dialog with two MudButtons. The dialog component: <MudDialog> <DialogContent> <MudText>Cost or Foreign Cost?</MudText> </...
StefanosP's user avatar
0 votes
1 answer
51 views

.NET Core userManager failing CreateAsync on an apostrophe

I seem to be failing on the CreateAsync call for the UserManager in my ASP.NET Core 7 Web API controller. var user = new AppUser { DisplayName = "Bob O'Donnell", ...
Bryan Dellinger's user avatar
3 votes
0 answers
76 views

Exception when using Dynamic Lamda expression on a list-Attempting to JIT compile method in aot only mode

Hi I am in a migration of Xamarin.Ios project to net7.0. I am using the “net7.0-ios16.1” as the target framework. When I execute the below code, I am getting the exception. "Attempting to JIT ...
Roshil K's user avatar
  • 2,683
0 votes
1 answer
27 views

Avoid reopening a window on the same object

There is a list of employees. On command, I want to open the employee’s detailed information window. How to avoid repeatedly opening a window for the same employee? Add a dictionary of opened "...
Stormhead's user avatar
0 votes
0 answers
29 views

Using Entity Framework 7 with custom User and Role entities, How can I access Role navigation property in the Data Context

As the title says, how can I access Role navigation properties in the data context. My User class looks like this public class AppUser : IdentityUser<int> { [Key] [DatabaseGenerated(...
Kieran's user avatar
  • 304
0 votes
1 answer
65 views

Problem with DateOnly format when passing a value to a SQL Server stored procedure

I am trying to get this working, but it fails with the following error when I try to fill my dataset (it's an Azure SQL database, and the client is on .NET 7.0): No mapping exists from object type ...
HPD71's user avatar
  • 1
0 votes
0 answers
24 views

How to use ApplyConfigurationsFromAssembly?

Solution structure: Domain Entities Data Context MyDbContext.cs Maps 20+ configs MyApp – startup project Currently I'm applying configs like this: protected override void OnModelCreating(...
Stormhead's user avatar
0 votes
0 answers
23 views

How to fix CoreEventId.MultipleNavigationProperties?

An employee may have a department to which he belongs. A department has employees who belong to it, and there may be an employee who is the head of this department. public class Employee { public ...
Stormhead's user avatar
2 votes
1 answer
118 views

I use VS Code, how can I smoothly migrate from ASP.NET Core in .NET 7 to .NET 8?

I am currently using VS Code for C# code debugging. I am currently using .NET 7.0 and I want to upgrade to .NET 8.0. I found the following Microsoft documentation webpage, but I have some questions ...
bokabokaboka's user avatar
0 votes
1 answer
46 views

Is it wrong to inject IConfiguration into a model class? [duplicate]

I am returning an instance of this class from an API: public class MerchantInfo { public int MerchantId { get; set; } public string ClickUrl => $"{Environment.GetEnvironmentVariable(&...
David Klempfner's user avatar
1 vote
0 answers
96 views

How to handle a Bearer token in .NET 7 when a RSA security key is needed?

There is a existing .NET Framework application that creates Bearer token. Another existing .NET Framework code application is able to recognize the token for authentication and authorization. RSA ...
Daan's user avatar
  • 2,968
0 votes
1 answer
59 views

How do I force dotnet publish to use Release configuration on a solution with multiple modules

We have a central .NET solution that uses multiple modules which each have its own .csproj and .sln, currently they use .NET 7. I am trying to publish all of the modules and force them to all use ...
Eljimo's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
101