Questions tagged [ado.net-entity-data-model]

Covers the Entity Data Model-part of ADO.NET

Covers the Entity Data Model-part of ADO.NET

505 questions
2
votes
1 answer

Table foreign key / association to itself?

I've got a table that stores inventory for a store that looks like this InventoryId int ParentId int ShortDesc int ... [other product data] ... A TShirt will exist in the table with a ParentId of -1. Any variations of size and colour…
2
votes
1 answer

ADO.NET Entity Framework - Composite primary key CRUD

i have following entities as you see BudgetPost has a composite primary key which is a foreign keys to entities Category and Budget. My question is what is the best way to make CRUD? Is there any way to mapp the foreign keys? The simple insert…
ilkin
  • 2,862
  • 3
  • 20
  • 20
2
votes
4 answers

What is Linq to Entities?

There are so many terms and it is getting hard to learn the thing you are after because of the noise. Is Linq to Entities just the practice of using Linq queries against the entities generated by the ADO.NET Entity Framework? Or, is it a separate…
2
votes
1 answer

ADO.NET Data Services

I'm looking at using ADO.NET Data Services with silverlight. I've been looking at the Data Model and Data Service Implementations (ADO.NET Data Services/Silverlight) topic on msdn. In their example, they build a data model generated from a…
Jeremy
  • 44,950
  • 68
  • 206
  • 332
2
votes
1 answer

Using Entity Framework 6 with MySQL

I've been trying to connect to a MySQL database which is hosted on a RaspberryPI and I have been having a lot of trouble and wanted to know if it is possible before I continue. I want to use .Net's Entity Framework 6 on Visual Studio 2013 in the…
2
votes
0 answers

Connect MySql database to MVC Project

I am trying to connect my MVC web application to a MySQL database. I've downloaded and installed the ADO.NET connector driver for MySQL and inserted the following lines into Web.config:
2
votes
2 answers

Entity framework doesn't use JOIN in SQL queries

I wrote some code for one to many relationships getting Invoice instances from Defect instances. mydbEntities ef = new mydbEntities (); //mydbEntities is derived from DbContext ef.Database.Log = s => System.Diagnostics.Debug.WriteLine (s); Invoice…
2
votes
1 answer

unable to update db entity

Hi i am facing a problem in my code. public static void settingSoundxStringLawyers_info() { mydatabaseEntities db2 = new mydatabaseEntities(); var UniqueNameObjects = from a in db2.Lawyers_info …
wasipeer
  • 1,015
  • 11
  • 23
2
votes
2 answers

Table and column naming conventions when plural and singular forms are odd or the same

In my search I found mostly arguments for whether to use plurality in database naming conventions, and ways to handle it in either case. I have decided I prefer plural table names, so I don't want to argue that. I need to represent an animal's…
user164226
2
votes
1 answer

Error trying to add ADO.Net Entity Data Model to project

I've finished building my database and I need to pull in it to my project using entity framework database first approach. I've got as far as entering the server details, username and password and then choosing the database once I press next I get…
Code Ratchet
  • 5,758
  • 18
  • 77
  • 141
2
votes
1 answer

Foreign Key Relationships with Entity Framework Code First (EntityData Issue)

I have two entity models, an Account and User and I am having difficulties implement foreign keys in the dependant model (User). As I am developing an Azure Mobile Service app I need to use the Entity Data interface which provides an 'Id' key field…
2
votes
0 answers

An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll Additional information: Collection was of a fixed size

I need some help in MVC Project that i am currently working on. I am trying to create a user with either a seller or buyer type. I Have created a many to many relationship as a user can be both a seller and a buyer. My Problem comes to inserting the…
2
votes
1 answer

Dealing with Master data table and Related tables in Entity Framework

I have 3 tables Employee(ID,FirstName,LastName) - in which we have all the employees including managers etc., EmployeeRole(RoleID,Role) - Here we defined the role of the employees Project(ProjectName,Manager,Employee,Date..) - here the details of…
Tanya
  • 1,571
  • 5
  • 22
  • 33
2
votes
1 answer

Using ADO.NET MetaDataWorkspace, how do I get a list of all foreign keys for each entity?

Thanks for looking. I have a need to interrogate my entity class in order to get a list of all entities (tables) and, for each entity/table, I need a list of all foreign keys (navigation properties?) as well as a count of the records stored in that…
2
votes
0 answers

Inherit base Dbcontext class

I have a question about inheriting a custom DbContext class. I have created a custom DbContext class called BaseContext in namespace 1 using C# Ado.net entity model generator as shown here: namespace NS1 { public partial class BaseContext:…