Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
21 views

Approach to Save external data and Update when data changed [closed]

I am using dotnet EF CORE to save some external data into my database. I would send serval HTTP Requests to a external endpoint regularly. The program will check if the incoming data has been changed ...
hi there's user avatar
0 votes
2 answers
51 views

.NET / EF Core CRUD The database operation was expected to affect 1 row(s), but actually affected 0 row(s);

I'm creating a new project trying to use Generics as much as possible, but I've encountered an issue when doing HttpPut and using EF Core. I'm using SQL Server in a container to store temporary data. ...
Marcio's user avatar
  • 27
-1 votes
0 answers
47 views

How to create optional properties in C#? [closed]

I want to create somewhat of a notebook app, where I can store different notes in a database, I'm using Entity Framework for the context. I have 2 different note types, one with input field and one ...
bence0601's user avatar
0 votes
2 answers
73 views

Why do I need to model a join table class?

I have two classes in C#: public class Student { public string Name {get; set;} public string Email {get; set;} public List<Course> Courses {get; set;} } public class Course { ...
Merlis's user avatar
  • 9
0 votes
0 answers
29 views

Error "To change the IDENTITY property of a column, the column needs to be dropped and recreated."

I'm a beginner and i am having this error when i use the update-data base, after the migration: "To change the IDENTITY property of a column, the column needs to be dropped and recreated." ...
Carolina Elias's user avatar
0 votes
0 answers
19 views

The "MICROSOFT.ACE.OLEDB.12.0" provider is not registered on the local machine

I'm using Automation Anywhere 360 where i'm calling database connect for Excel using AA360 Action (Database connect) and this is working as expected . But when i'm calling the same via console app it ...
Rajkumar Yadav's user avatar
-2 votes
0 answers
62 views

Is there any way that I can write this class better than I did?

I'm developing an e-commerce website for my uncle using C#. I'm trying to think of a better way to write this class where I can perform the update operations faster, if I need to modify a user's data. ...
Misu Stefan's user avatar
-2 votes
0 answers
22 views

C# Plugin Database Connection

in the Autocad Plugin I wrote in C#, I can use the x, y axis and last field information entered by the user. I want to save to SqLite database. I would be very happy if you could help me on how to do ...
Berat Aydın's user avatar
0 votes
0 answers
37 views

GridView`s SQL Data Source update

this is the aspx GridView <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:con %>" SelectCommand="SELECT [...
Alfahd Steel's user avatar
-2 votes
0 answers
26 views

Problem opening the database with SQLite in Visual Studio Code

I am following a course named "Build an app with ASP.NET Core and Angular from scratch", and in that course everything was going smoothly up till I tried to run the "SQLite: Open ...
Gnsd's user avatar
  • 1
0 votes
0 answers
22 views

Change UsersRoles table PK

In Entity Framework Core 8, I'd like to change the default PK for UsersRoles table, currently set as follows: table.PrimaryKey("PK_UsersRoles", x => new { x.UserId, x.RoleId }); to ...
jinew's user avatar
  • 1
0 votes
1 answer
34 views

ContextDB Disposed Before Background task finish [duplicate]

I am trying to build a Http API By C#. After returning the HTTP Response, I need to do some works and then update the database in the background. However, I guess the DBContext instance is disposed ...
hi there's user avatar
0 votes
1 answer
65 views

Unable to create a 'DbContext' of type NULL. The exception 'Object reference not set to an instance of an object.'

I have a problem with add-migration for my database in ASP.NET Core 8.0. Here is the code ApplicationDbContext: public ApplicationDbContext(DbContextOptions<DbContext> options) : base(...
Trung Đặng Đức's user avatar
1 vote
0 answers
76 views

Issue with TPC hierarchy and relations in EF Core 8 + PostgreSQL

I have a problem when trying to use TPC hierarchy mapping in EF Core 8, where I get InvalidCastExceptions. What I wanted to do is have a BaseAuditedEntity class for most models in my app (only except ...
N.T. Dang's user avatar
0 votes
0 answers
20 views

Connecting to a h2 database replaces the .mv.db file with a blank

I've converted h2-2.1.214.jar using ikvmc but everytime i point to a embedded (local) database, it auto creates a new one and replaces the existing .mv.db with a new db. I've tested the same exact ...
LuxC's user avatar
  • 147

15 30 50 per page
1
2 3 4 5
796