Questions tagged [entity-model]

The Entity data model (EDM) specifies the conceptual model (CSDL) of the data, using a modelling technique that is itself called Entity Data Model, an extended version of the Entity-Relationship model

The Entity Framework is a set of technologies in ADO.NET that support the development of data-oriented software applications. Architects and developers of data-oriented applications must model the entities, relationships, and logic of the business problems they are solving, and they must also work with the data engines used to store and retrieve the data. The Entity data model (EDM) specifies the conceptual model (CSDL) of the data, using a modelling technique that is itself called Entity Data Model, an extended version of the Entity-Relationship model.

http://en.wikipedia.org/wiki/Entity_Framework#Entity_Data_Model

53 questions
2
votes
0 answers

1 to 0..1 relationships with cascading deletes in Entity Framework

Assuming the following model, created in Entity Framework 4.3: http://www.dumpyourphoto.com/files4/122585/bI2uq9a.png We have: A Location Entity A company with a location A relationship: location contains 0..1 companies. This choice is necessary…
Olaf
  • 879
  • 6
  • 19
2
votes
4 answers

'row_number' is not a recognized function name. Incorrect syntax near the keyword 'AS'

I've created a simple project with an SQL Server database with dozens of tables and plenty of indices but nothing really complicated. No triggers, no stored procedures, no additional "database magic". The code is written in C#, using the Entity…
Wim ten Brink
  • 25,901
  • 20
  • 83
  • 149
1
vote
2 answers

Unable to load the specified metadata source when using EntityDataSource - Entity Framework

My MyModel.edmx is in the assembly DataAccess.dll. This assembly is referenced in my web project (C#) My entity connection string is the problem. This is what I copied from app.config to my win.config:
bobetko
  • 5,019
  • 14
  • 58
  • 85
1
vote
1 answer

JPA mapping relations

Suppose I have 3 entities: MonitorPeriod, Monitor and File. Now the requirement said that for each MonitorPeriod, which table is something like below: ID, DATE_FROM, DATE_TO 1 I have One and just One Monitor, which table could…
CoderJammer
  • 599
  • 3
  • 8
  • 27
1
vote
5 answers

Field 'record_id' doesn't have a default value - Spring JPA Error

I'm working on adding a feature to an already developed spring boot web application. The primary entity that has child entities is a Record. It has a few columns/variables that I want to now be in its own, separate entity (CustomerOrder) and exist…
1
vote
0 answers

Design solution for a complication in observer design in java

I have an entity-model defined in POJOs as class A { B instance_b; } class B { Collection instance_c; } class C {} I have implemented an observer pattern where there are 2 concrete observers - JsonListener and DatabaseListener, which…
palkarrohan
  • 459
  • 1
  • 4
  • 16
1
vote
1 answer

How to add Entity Model containing a list of another Entity Model type to Database with EF using lambda expressions and linq

I've got an Entity Model containing a list that is type of another Entity model, I need to add a record with a list of the other model to the Database at once a null reference exception occurs when I'm adding each prop to prop list with ForEach …
1
vote
1 answer

LINQ entity data model generated code error - The type 'DBContexts.Category' already contains a definition for 'ID'

I have two tables in my database - Category and Department which both contain the same columns - ID, Name and Code. I can create a new entity model using the Visual Studio 2008 designer and add the Department and it works fine - I can query the…
Tom
  • 623
  • 8
  • 23
1
vote
2 answers

Disconnected DataSet

DataContext/Entity Model always read data from Database. is there any way DataContext/Entity Model will read the data from DataSet. Thanks
Ritesh Jain
  • 39
  • 1
  • 3
1
vote
1 answer

WCF Data Service - Save Nested/Related Entities

We are using the following system setup: WCF Data Services 5.1.0-RC2 Entity Framework 4.0 Problem: We are trying to create and save nested/related entities on client side using WCF Data Services. If we try to save using following…
0
votes
2 answers

Creating Entity Model with Cross Referencing Table - EntityFramework 4.1

Here is my scenario (tables): Departments ==================== Id (int) Name (varchar) Employees ==================== Id (int) Name (varchar) EmployeesDepartmentXREFs ==================== EmployeeId (int) DepartmentId (int) When I import these 3…
bobetko
  • 5,019
  • 14
  • 58
  • 85
0
votes
2 answers

Is it possible to use the VS Entity Diagram designer with ASP.NET MVC 3?

The introductory videos for ASP.NET MVC 3 imply that the desired workflow is for me to declare classes that define my model (code-first design). This strikes me as weird, since Visual Studio has a nice Entity Diagram designer which can generate such…
Timwi
  • 65,159
  • 33
  • 165
  • 230
0
votes
1 answer

Error while Changing the connection string dynamically

Im having this problem when changing my entities connection string. here is the code: SqlConnectionStringBuilder sqlBuilder = new SqlConnectionStringBuilder(); sqlBuilder.DataSource = @"KURT-PC\SQLEXPRESS"; …
Mazda
  • 85
  • 1
  • 1
  • 10
0
votes
1 answer

adding entries to the "Relational" table in entity model? how do i do that?

so the story is very simple. I have one table called Products and another Called categories. In addition, i have another table called ProductCategories that hold the relationship of catetories to their corresponding products (i.e, the table has two…
Or A
  • 1,789
  • 5
  • 29
  • 55
0
votes
1 answer

In Domain Driven Design - single public entity model, or model per bounded context?

In Domain-Driven Design, we try to separate concerns between the functional areas (bounded contexts), and minimize dependencies between the contexts. The same entity can have different internal representation in different contexts. But in the…