Questions tagged [database-first]

171 questions
0
votes
1 answer

Relationships in pony.orm with create_tables=False

The intention is to have two simple classes representing two related tables that already exist in the db. The code is: from pony.orm import * db = Database() class System(db.Entity): _table_ = 'some', 'systems' system_id =…
dmigo
  • 2,849
  • 4
  • 41
  • 62
0
votes
0 answers

Generate entities for 1:1 relationship without PK on the related table

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 scaffold entities from this…
Liero
  • 25,216
  • 29
  • 151
  • 297
0
votes
1 answer

Create webapp with full stored procedures

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 render the view. So what is the best framework that…
Hoang Tran
  • 886
  • 3
  • 13
  • 32
0
votes
1 answer

Integrate MVC Core Identity with other Database First Tables

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 field in the AspNetUsers table so I can get the…
Ahmad
  • 49
  • 1
  • 2
  • 9
0
votes
1 answer

Batch Rename Classes in Entity Framework Database First

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 "Account". partial class account { …
0
votes
1 answer

Entity Framework Database First Approach

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 have another DB with the same structure but…
user7912694
0
votes
1 answer

Posting data from view to model and control returns null

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. Controller: [HttpPost] public ActionResult…
user5495476
0
votes
0 answers

Error When Converting Project from Code-first to Database-First

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 to Convert my Project from code-first to…
0
votes
0 answers

Error sending a string to SQL Server

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 char(1). I create the object with the following code: Area objArea = new Area() { CodArea =…
LordCommanDev
  • 922
  • 12
  • 38
0
votes
0 answers

C# Entity Framework Database First: Create association so that an entity has a list of the same entity type

I have the following scenario to solve, using entity framework and a database first approach: A table Student having the fields: ID (PK), Name, Surname And a table StudentsFriends that basically tells me what students are related to another, having…
Filippo Vigani
  • 904
  • 1
  • 9
  • 22
0
votes
1 answer

Visual Studio 2015 version 3 freezes on editing Roles in Azure project

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 2015 v.3 that I am attempting to publish to an…
wormwood
  • 135
  • 1
  • 10
0
votes
1 answer

Lightspeed database-first tables with plural and singular generating same entity names

I am using Oracle and LightSpeed Orm and generating model from database. It seems there is an issue while creating tables that are both plural and singular. I am getting an error Error 2 Ambiguous moniker '/Ecom/ClaimType' encountered. It is…
Matas Vaitkevicius
  • 58,075
  • 31
  • 238
  • 265
0
votes
0 answers

Modifying the table in the database without loosing the data using database first approach, Entity Framework

Is there a way to add/delete columns in the database using database-first approach in Entity Framework? I know we can do this by doing code-first approach.
0
votes
0 answers

.Net api for generating entity framework models from database

Does the entity framework provides an API for .net (c#) to generate models from an existing database? I don't want to use EdmGen.exe, because a direct integration would be nice. Maybe even the code which is used by the EdmGen.exe provides some…
BendEg
  • 20,098
  • 17
  • 57
  • 131
0
votes
0 answers

EntityFramework returns: EntityReference can have no more than one related object, but the query returned more than one related object

I have created a (dummy) database view, called; vContact, and a stored procedure returning the same types as the view (the view would be too complex if I should do what I need). When I invoke the stored procedure I get a ContactView object with the…