Skip to main content

Questions tagged [database-first]

The tag has no summary.

database-first
Filter by
Sorted by
Tagged with
Tooling
0 votes
4 replies
92 views

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. ...
alex_pythooon's user avatar
1 vote
4 answers
4k views

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 ...
user3500176's user avatar
0 votes
1 answer
383 views

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 ...
Vlasy22's user avatar
0 votes
0 answers
2k views

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-...
user95's user avatar
  • 11
0 votes
1 answer
81 views

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 ...
Zain Nabi's user avatar
3 votes
1 answer
83 views

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 ...
user avatar
0 votes
1 answer
62 views

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 ...
Subbu Sharma's user avatar
0 votes
0 answers
544 views

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 ...
NedaM's user avatar
  • 143
0 votes
1 answer
274 views

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 ...
Cawboy's user avatar
  • 173
2 votes
2 answers
1k views

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 ...
Long Hoàng Nguyễn's user avatar
2 votes
2 answers
2k views

I'm trying to scaffold Models from an existing database. Scaffold-DbContext "connectionString" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models ...
dr1sshamra's user avatar
1 vote
1 answer
4k views

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 ...
user avatar
1 vote
0 answers
284 views

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 ...
Sackey's user avatar
  • 402
0 votes
0 answers
3k views

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 ...
Dvalin's user avatar
  • 31
1 vote
0 answers
44 views

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 ...
gemon01's user avatar
  • 341
0 votes
1 answer
57 views

I use database first on my project.I wil save to Profile table and fill a dropdown from department table on this page . How do I use both profile.cs and ...
Murat Onuk's user avatar
3 votes
1 answer
1k views

After modifying an EDMX in Visual Studio 2019, it saves the EDMX properly but does not generate the C# files. This is a database first functionality, is there a new trick in VS2019 to actually ...
jsgoupil's user avatar
  • 4,047
3 votes
1 answer
13k views

I am trying to create the model from existing DB using EntityFramework Core, database first approach. The model was created, but the table name and column name were changed to C# style. Because I want ...
wltz's user avatar
  • 679
0 votes
1 answer
597 views

I've used entity framework in my projects and i used database-first approach almost in each time that i change the database ( adding/removing a field to existing table or add new table ) after updae ...
Hedayat Allah Kamalian's user avatar
2 votes
0 answers
210 views

what i am trying to do is exclude few column from EF store and EF modal. for reference there are two method : https://stackoverflow.com/a/40742144/4998968 but i want to exclude column when edmx file ...
Satyendra Routela's user avatar
0 votes
0 answers
170 views

I am working on an ASP.NET MVC web application, and we already have a SQL Server 2012 database. So I mapped the database tables inside our ASP.NET MVC using ADO.Net Entity Framework version 5.0, and I ...
John John's user avatar
  • 7,395
0 votes
0 answers
77 views

I'm developing a web API with existing database and it has 600k+ records on it. I will be using EF with a database-first approach and planning to clone the production db for staging purposes. I'm ...
nielcleo's user avatar
0 votes
1 answer
683 views

The intention is to have two simple classes representing two related tables that already exist in the db. The code is: ...
dmigo's user avatar
  • 3,055
1 vote
0 answers
270 views

I'm using VS2017 and Firebird as database. I use database first to create my Model from all stored procedures. When I execute a procedure, all string variables cast as ...
Amin's user avatar
  • 183
3 votes
1 answer
1k views

Need help! I am new to Core 2.0 and VS 2017 and haven't had much experience with MVC. I have an existing database that I need to use with a core 2.0 project at work. I was able to use the Scaffold-...
CJohn Ransom's user avatar
1 vote
2 answers
2k views

According to oneunicorn, DbSet.Attach puts all entities in the graph into the Unchanged state. However, entities will be put in the Added state if they have store-generated keys (e.g. Identity ...
William Jockusch's user avatar
3 votes
1 answer
3k views

I have a field in Model(tablaMetadata) with boolian field for gender as below: (I work with database first MVC) ...
L Bar's user avatar
  • 45
1 vote
1 answer
653 views

The project I work on uses the process of database first, update EF model from db afterwards. I face the following problem: if the database is in "compatibility level SQL Server 2016", my update of ...
user avatar
2 votes
1 answer
776 views

I'm getting this error: Could not load type 'Microsoft.EntityFrameworkCore.Infrastructure.DesignTimeProviderServicesAttribute' from assembly 'Microsoft.EntityFrameworkCore, Version=2.0.0.0, Culture=...
Shehryar Khan's user avatar
0 votes
0 answers
33 views

I have three tables in existing sql db: Events ConcreteEvents1 ConcreteEvents2 There is 1:1 relationship between events and concrete events and only events table has PrimaryKey. Is there any way to ...
Liero's user avatar
  • 27.9k
0 votes
1 answer
560 views

I want to create a web application, all actions (Create, Update, Delete) should be done using SQL stored procedure. Every action in the web just calls a stored procedure and receives json data to ...
Hoang Tran's user avatar
1 vote
1 answer
4k views

I have a very simple LINQ query where I call a view to get an object, basically it looks like this: context.view.FirstOrDefault(p => p.id == key) Key and id ...
Chip Potato's user avatar
1 vote
3 answers
77 views

I have a database with 2 table Song vs Artist mapping by Mapping_Artist_Song, then i add existing database to models(database first) in my project and now i dont know how to use linq to select song ...
Tan Sang's user avatar
  • 2,138
0 votes
1 answer
454 views

I am using MVC Core with the default individual user authentication. I added FullName field to AspNetUsers Table and it is working fine. I need to create a relationship between my tables to the id ...
Ahmad 's user avatar
  • 59
0 votes
1 answer
414 views

Is it possible to batch rename the Class (Entity) names in auto generated .cs files inside edmx model? I need to have uppercase first letter for all the entities e.g. "account" needs to be changed to "...
Mustafa R's user avatar
  • 103
0 votes
1 answer
253 views

I am working on a project in which I am assigned to implement database first Approach. Here, I want to know that when we initiate database first approach we map that to an existing DB, but what if I ...
user avatar
15 votes
5 answers
9k views

As you know, the newest version of Visual Studio 2017 abandons the 'project.json' and uses .csproj instead. I'm using the RTM version and want to generate model ...
even's user avatar
  • 315
0 votes
1 answer
53 views

I am currently busy with an project where I do use ASP.NET MVC. When I try to post data to model and controller I am getting NULL returned in the parameter of the method I have used in the controller....
user avatar
1 vote
2 answers
582 views

I choose Database First: Here is an example table that is experiencing this issue. As you can see the EntityId column is the Primary Key: The imported table in the model browser shows that it has the ...
party_Rob's user avatar
0 votes
0 answers
244 views

I have worked on a project with Code-first Approach and know I need to convert it to Database-first Approach, because I have some logic I have to executed it through Stored-Procedure. So, I decided ...
Loai's user avatar
  • 732
0 votes
0 answers
114 views

I'm working on a project with C# and SQL Server. I have a table called Area and it has a column called flag, it is a ...
LordCommanDev's user avatar
7 votes
7 answers
7k views

I have a SQL table like this: DepartmentID is parent of department. I've build a tree by this table(in ASP.net (C#) project): Records in tree above is: I need to ...
Ali Soltani's user avatar
2 votes
2 answers
13k views

I'm new into MVC and I'm having a hard time solving this following issue. I got a userID via Session["LoggedUserID"] as it get once the user log in. I want to pass ...
skylake's user avatar
  • 427
0 votes
0 answers
380 views

I have the following scenario to solve, using entity framework and a database first approach: A table Student having the fields: ...
Filippo Vigani's user avatar
1 vote
2 answers
3k views

I created the MVC application database-first with the ID field being generated by the database. Since the ID is generated by the database, in the Model I set the 'StoreGeneratedPattern' property to '...
abiNerd's user avatar
  • 2,043
0 votes
1 answer
166 views

I'll preface this with the fact that I'm very new to Visual Studio, so I am prepared to hear that my problem lies in something I haven't read yet. I have a database first project in Visual Studio ...
wormwood's user avatar
  • 135
0 votes
1 answer
177 views

I am using Oracle and LightSpeed Orm and generating model from database. It seems there is an issue while creating tables that ...
Matas Vaitkevicius's user avatar
38 votes
7 answers
93k views

I have added a new column to a table in my database. The table is already defined in the existing Entity Framework model. I've been through most of the items here on how to do this and it still fails. ...
Rodney Buxton's user avatar
1 vote
1 answer
282 views

I'm working on a project in asp.net mvc. I want to authenticate users using Asp.Net Identity and Owin. I'm aware that Identity has its own tables which are created using code first approach. However, ...
WebNewbie's user avatar
3 votes
2 answers
3k views

I have three simple classes and I am wiring up EF6 to an existing database. Classes are as follows ...
Solo812's user avatar
  • 491