All Questions
Tagged with asp.net-core-mvc sql-server
192 questions
-1
votes
1
answer
78
views
Multiple many-to-many and multiple one-to-one relationships in the same entities
The first class:
public class Route
{
[Key]
public int Id { get; private set; }
public decimal Price { get; set; }
public decimal CapitalPrice { get; set; }
public int ...
-2
votes
2
answers
165
views
Stored procedure with multiple parameters in EF Core 8
I am trying to use a stored procedure with multiple parameters but I keep getting a 500 response from my API. The stored procedure returns a string result and takes 3 varchar(30) parameters.
Stored ...
0
votes
1
answer
54
views
Correctly save email field through registration form in ASP.NET Core MVC app
I have a little movie app, and it allows users to register and log in and add movie entries and add comments to the movie entries. But on the registration form, the email field is not correctly ...
0
votes
0
answers
75
views
More than one DbContext named 'ApplicationDbContext' was found. Specify which one to use by providing its fully qualified name using its exact case
Currently I am going to add my first migration. Please find the code for the player class. When I write
Add-Migration initialMigration
I get following error:
More than one DbContext named '...
1
vote
1
answer
524
views
How to work with SQL Server table dependency with ASP.NET Core
The context was the SQL Server table dependency not working, but my SignalR is working fine. There is no error showing its just that when I change some data through SSMS, the code below is firing.
...
0
votes
0
answers
68
views
Getting SQL exception data is null, this method or property cannot be called on null values
I have a C# application in which I am trying to fetch details from a SQL Server database. This database contains null values, and I want to handle these in the C# application.
My table schema is like ...
1
vote
2
answers
67
views
Why do I get the SpecialityName as null here?
I am working with ASP.NET Core And Entity Framework, and when I request this controller I get this.
The problem in using the FromSql method is that it returns the SpecialityName as null, when the same ...
0
votes
2
answers
265
views
Troubleshooting connection issue: ASP.NET Core 8 MVC project containerization with SQL Server Docker container
I have an ASP.NET Core 8 MVC project that I've containerized. Initially, I pulled a SQL Server image from Docker Hub and then modified the default connection as follows:
"ConnectionStrings": ...
0
votes
0
answers
36
views
How to update changes in model to the database in MVC?
So this is my first time working with MVC. Is there any ways to update the database after the initial migration from the model to the database? Its code first based approach so im not sure if there is ...
1
vote
1
answer
184
views
System.InvalidOperationException: 'The ConnectionString property has not been initialized.' in ASP.NET Core 8, Entity Framework and Linq
I am using ASP.NET Core 8, Entity Framework and Linq to connect to a SQL Server database, but I am getting this error
System.InvalidOperationException: the ConnectionString property has not been ...
1
vote
0
answers
75
views
An error occurs while trying to modify IdentityUsers Many-to-Many relationship
I'm trying to create a project to familiarize myself better and I have this ApplicationUser class:
public class ApplicationUser : IdentityUser
{
public string? FirstName { get; set; }
public ...
0
votes
1
answer
696
views
Entity Framework Core add relationship between view and standard model objects
This is the scenario: I use SQL Server as backend, I have an instance with a database that has some common tables that I want to join with the tables in the database of my new MVC application.
We plan ...
-1
votes
2
answers
87
views
Display only the current user logged in records in the index view in ASP.NET Core MVC?
How can I display the currently logged in user's records in the index view? I don't want them to see other users record, I just want them to see their own added records in the database. I already have ...
-1
votes
1
answer
83
views
How to create SQL Server login for IIS AppplicationPool ,When server has join a domain group [duplicate]
My ASP.NET Core MVC web app is completed and shows no error, but when I try to deploy using an IIS profile to my web server, I get this error in the event log:
The certificate received from the ...
0
votes
0
answers
71
views
Separate users from admin users in different databases on the same server
I use ASP.NET Identity and want to achieve following databases setup:
Database that has all application data, including User's accounts
Separate database that will only contain Administrators ...