173 questions
Tooling
0
votes
4
replies
71
views
Is there a Database First approach in Java like Entity Framework in C#?
I’m used to working with a Database First approach in C#. I design my database schema (often with MySQL Workbench) and do a forward engineering, then generate my C# models using Entity Framework’s. ...
1
vote
4
answers
4k
views
Create an ASP.NET Core MVC application with database-first approach
I want to create an ASP.NET Core MVC application. It seemed it was no good idea to use a .NET Framework project, since the abandon of Entity Framework 6.
So, I try .NET Core, and I read this:
Entity ...
0
votes
1
answer
374
views
How to extend SQLAlchemy generated classes in declarative model outside of the model?
I am using SQLAlchemy + sqlacodegen in my python project.
I have succesfully generated declarative model from my database, which looks like this:
DB_Model.py
from sqlalchemy import Column, DateTime, ...
0
votes
0
answers
2k
views
Cannot find ado.net entity data model in visual studio 2022
I want to start a new project in ASP.NET core MVC web application. In the past I'm used to starting with the code, I create the code and I create the dbContext and I make the migration of the data Add-...
0
votes
1
answer
76
views
C# Code First Vs. SQL Database first when using a business logic layer
I am firmly in the camp of being a database first developer. I believe there are pro's and cons' to each approach. However when creating a code first approach should the newly created classes have ...
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
58
views
How to call the Session inside ajax based on RoleId in Controller?
I need to call a certain webpage based on Id in user.RoleId which is in my controller and in the script page it needs to call that RoleIdusing session.
My Controller:
if (ModelState.IsValid)
...
0
votes
0
answers
542
views
How to work and add new table to database first model in asp.net core?
I have an existing SQL Server database that populated with data via another app. I want to work with this database in a new project (ASP.NET Core web application).
I know I can add this database to my ...
0
votes
1
answer
267
views
Add SQL function into project with EF6
I want import my function from SQL Server into my ASP.NET MVC project with EF6 database first.
My problem is when I update database in .edmx file, based on what I found in the sources, I open Model ...
2
votes
2
answers
1k
views
Entity Framework Core Database First not render Model of Stored Procedure?
Database
I have Stored Procedure name GetAllCustomer
I have Stored Procedure in the EntityFramework 6x and in Project ASP.NET MVC5.
I'm using by calling db.GetAllCustomer.ToList();
But in the ...
2
votes
2
answers
2k
views
EF core Scaffold-DbContext doesn't work : Execution Timeout Expired
I'm trying to scaffold Models from an existing database.
Scaffold-DbContext "connectionString" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
But I got this error:
Microsoft....
1
vote
1
answer
4k
views
How to connect to a SQL database on MacOS with Entity Framework Core and Database First
I have recently changed from Windows to MacOS and I'd like to make a simple project with ASP.NET Core Entity Framework with CRUD operations. I want to use Database First.
So please can someone guide ...
1
vote
0
answers
271
views
How to use a Database-first registered DbFunction inside another context with Linq To Entities?
I would provide an Oracle Database function (ie. RemoveDiacritics) in my low-layer C# package which is installed on multiple websites, to allow these applications to use my custom function inside ...
0
votes
0
answers
3k
views
Violation of PRIMARY KEY constraint 'PK. Cannot insert duplicate key in object 'dbo.Cursuri'. The duplicate key value is (0)
My assignment is to do crud operations using database first on an Windows Form app. Currently my save button (Salveaza) is not working properly ( I get the above error when I debug it) and I don't ...
1
vote
0
answers
44
views
Add ASP.NET Core Identity to an existing project that has the database first model
I would like to add ASP.net Core Identity in an already existing project, which already has many tables mapped with database first, also I should add a relationship between AspNetUserId and my table ...