2,386 questions
0
votes
0
answers
52
views
System expansion with C# ASP.NET MVC
Currently, I have an employee management system for a certain branch with many functions such as CRUD, export/import of excel files, etc. Now I want to expand it, bringing this system to other ...
0
votes
2
answers
165
views
EF Core stored / computed property query database
I'm trying to migrate my C# project from ASP.NET with EF to ASP.NET Core MVC and EF Core. I'm self taught and I'm the only person who works on this project so my project architecture and standards I'...
0
votes
1
answer
52
views
How can I edit 2sxc entity structure, like add property, change property type etc. programmatically via C# code?
I need to update entities programmatically via C# code. I have some code already that creates IApp object of the target 2sxc app. From there I've been reading data via appObject.Data["...
0
votes
0
answers
59
views
Different tool to generate codefirst migration. Time to clean up and refactor
I've inherited a non-complete clean solution from the point of view of CodeFist on a .NET 7 project.
The scenario is the following:
I had an old part of the Codebase that used EF Code first migration
...
-1
votes
1
answer
680
views
Code first gRPC client generation problem in ASP.NET
I have followed this microsoft tutorial to create gRPC service and client.
Now i have problem with generating gRPC client class.
To get data i use this method, but i doesn't seem right. I wish I could ...
0
votes
1
answer
202
views
Entity Framework Core code-first approach: database not being created automatically [duplicate]
I'm having an issue with Entity Framework Core while trying to use the code-first approach.
I want the database to be automatically created when I run the code, but it's not happening.
If I don't ...
1
vote
1
answer
384
views
How can I use GRPC versioning in a code-first approach?
As you can see in Versioning gRPC services, in GRPC we can use versioning by defining package in a proto file.
How can I achieve the same functionality in a code-first approach?
0
votes
3
answers
121
views
How to create relation between one entity and others entities types using child id and child type in C# .net core EF?
I want to create a direct relation between the Task entity and the child entities, to get with the task the corresponding child and when I get the child to get the corresponding task.
I have an entity ...
0
votes
1
answer
25
views
telerik sheduleview wpf code first with entity framework core
I am new to .net core, here is the official repository from telerik for code first approach on schedule view :
https://github.com/telerik/xaml-sdk/tree/master/ScheduleView/DatabaseEntityFramework
if ...
0
votes
1
answer
555
views
EF Core enum collection property comparing
I'm using code first with Entity Framework Core for handling som addresses in an application.
These addresses all have a HousingTypes property which is a collection of enums that can by any of the ...
0
votes
0
answers
2k
views
How to get string[] array from database with EF core [duplicate]
I got one big question.
Below is the code I used to store string[] arrays in database, but I cannot Get them from database.
my Model:
public class TokenTransaction
{
[Key]
public int Id { get; ...
0
votes
1
answer
697
views
How to use GroupBy() and Min() with Entity Framework Core ASP .NET
Let's say my database table Agents is the following,
+------------+----------------------+--------------------+------------+-----------------+---------+
| AgentCode | AgentName | ...
0
votes
2
answers
888
views
How to change foreign key suffix in Entity Framework Core?
In EF Core with a code-first approach, by default column referencing another entity has an Id suffix - for example PersonId.
Is it possible - and if so, how? - to change it to _id, so to person_id?
4
votes
2
answers
5k
views
How to automate DB setup of Entity Framework's Code First in Testcontainers for testing?
In order to setup the Testcontainer's MsSqlTestcontainer for testing, I copied the script emitted by dotnet ef migrations script and planted it in the unit-test's setup (actual code doesn't :
void ...
1
vote
1
answer
568
views
Defining entities in nestjs graphql code first approach with custom field results in error
I am using NestJs along with GraphQL with code-first approach as explained in the documentation. It works correctly till the time I have to use a custom field in an entity which is an array of objects....
3
votes
2
answers
4k
views
The foreign key property 'fk1' was created in shadow state because a conflicting property with the simple name 'property'
I'm creating my database using code-first and entity framework core, I have a 1:1 relationship, but in this relationship, I have a navigation property in both entities, this is my first entity:
public ...
0
votes
1
answer
76
views
Entity Framework assign multiple foreign key - code first approach
I don't know how to add two foreign key in the following scenario:
I have two tables, one exists in the database yet (table Market), and I have to create a new table (MarketBranch).
Table Market:
...
3
votes
1
answer
82
views
New web project design pattern specification
I have a relational database with more than 50 tables. They have more than one type of relationship, one to one, more than one.
Will code first or database first be more effective in the new MVC ...
0
votes
1
answer
47
views
How can I add two property in my model in EF code first from one model?
I want to add two properties from the city model:
after migration this error shows up:
Unable to determine the relationship represented by navigation
'City.Orders' of type 'ICollection'. Either ...
0
votes
1
answer
1k
views
Postgres: SequelizeDatabseError: column id does not exist
I am using Postgresql with code-first approach in my Node.JS project. Some of the tables were already there in the inherited code. There is a table called user_games storing the information about ...
0
votes
1
answer
312
views
UseLazyLoadingProxies codefirst null navigation property only after database creation
Problematic code (Present in Core.run() below)
user.UserWordRequests.Add(
new UserWordRequest
{
Date = DateTime.Now,
Word = word
}
);
Decription of problem
Database doesn'...
0
votes
0
answers
32
views
ASP.NET MVC code first, foreign key to Sharepoint table
Maybe someone can help me with my problem:
Problem
I am working with ASP.NET MVC and have created a simple website with a database behind it. In this database I have different tables, but the ID of ...
0
votes
0
answers
114
views
How to create data without out of range exception
I tried to create data by using code first to finish my OOP assignment. However, when I created connections among class, I encountered a problem: System.ArgumentOutOfRangeException: 'Index was out of ...
2
votes
2
answers
3k
views
How to store a List of enum using EF 5
I am currently working on a small project with code-first: I have to create a movie database and as usual each movie can have more than one genre (m:n). Since genres are constant, I decided to create ...
0
votes
0
answers
47
views
EF Code-First Data Type Conflict between MySQL and Oracle
I using EF code-first approach for tow databases engine (Oracle and MySQL). but I have problem when declare property with decimal type then I cant apply database migration in oracle database because ...