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
1
vote
2 answers

ado.net entity data model parent child relationship

Scenario I am playing MVC NerdDinner project and using ado.net entity data model instead on 'dbml' I have 2 database tables Dinner & RSVP where RSVP contains DinnerID as foreign key from Dinner table. Now when I am accessing a particular record from…
Miral
  • 5,968
  • 16
  • 57
  • 85
1
vote
2 answers

Validate attributes through edmx

I'm working on an MVC3 project I have created my database on SQL server 2008 then I add it using entity data model, now I have the .edmx I don't want to generate the code of the classes because till now it's not stable and I don't feel the need to…
1
vote
2 answers

OData Library serializes Edm.Single as number

According to the specification (and the odata.org summary) Edm.Single (and Edm.Double) are represented 'as a JSON string' (i.e. surrounded by double quotes). However the OData Library serializes Edm.Single (I haven't verified that Edm.Double has the…
evoskuil
  • 1,011
  • 1
  • 7
  • 13
1
vote
1 answer

ADO.NET EF + CF: How to use the existing CF context and bind SQL external objects (views, stored procedures, etc.)?

I have a database, 90% created with EF 4.1 + Code First approach on a SQL Server 2012; the rest is generated by some SQL code (FUNCTIONS, COMPUTED COLUMNS, VIEWS, INDEXES, ETC.). Now, I needed to use ObjectContext and at the same time optimize…
1
vote
1 answer

How to transpose the data in a gridview to a new gridview unsing LINQ to entities?

I'm new to LINQ and was hoping to get some help from anyone that know how to transpose the data in a grid using linq to entities? Any help would be much appreciated. Thanks in advance. from... ID Date Amount 1 2/1/2012 100 2 …
1
vote
1 answer

Filtering data with MVC3 and ADO.NET Entity Data Models

I've created a table called Orders in my SQL Server 2008 db. This table has columns which include dateCreated of type Date, CustomerId, InvoiceTypeId, InvoiceId etc. I also have Invoice, Customer and InvoiceType tables. I've created a View in my…
Baz
  • 12,713
  • 38
  • 145
  • 268
1
vote
3 answers

ASP.NET MVC: How to view query executed by SaveChanges (on the ADO.NET Entity Data Model)

When trying to add a few items to the database I'm getting this error: UpdateException was unhandled by user code An error occurred while updating the entries. See the InnerException for details. The InnerException contains this: {"Column count…
Jeroen Pelgrims
  • 1,085
  • 1
  • 10
  • 19
1
vote
2 answers

Fastest way to collect data from db?

Work on C#.In my application several time need to select\collect datafrom DB.Fro this task I do the bellow step 1)Write SP 2)Execute the Sp 3)Fill result to Generic collection(ORM) 4)By the collection Bind the control I want to know is there any…
shamim
  • 6,640
  • 20
  • 85
  • 151
1
vote
1 answer

Is there a way to accomplish cascading copies of Entities in EntityFramework?

Suppose I have a table "Client" and a table "Contact". If I wanted to copy a Client row into my database along with new entries for Contacts (I don't want pointers to the already existing table) how could I accomplish this in a recursive way? I'd…
Eric
  • 11
  • 1
1
vote
1 answer

Store data from XML in relational SQL database

I need to store data from an XML file into SQL database with 2 tables. The XML file looks like this (the full file has more Document nodes): 110 2020-10-23
Oggie
  • 71
  • 1
  • 6
1
vote
1 answer

WCF Service with version

I am new on working with WCF service, I am using ADO.Net Entity Data Model, Name it -> DogModel.edmx. where the Dogs table has ID,Name and Age. It's working fine. but, i wanted to understand the concept behind the version. Here is code for…
Sujit
  • 3,677
  • 9
  • 41
  • 50
1
vote
1 answer

Adding a child object before inserting the parent object and child object

I worked through the Nerd Dinner application. In the Create action method they have the following code: NerdIdentity nerd = (NerdIdentity)User.Identity; dinner.HostedById = nerd.Name; dinner.HostedBy = nerd.FriendlyName; RSVP rsvp = new…
1
vote
1 answer

How to extend the ADO.NET entity designer?

Does anyonw know how to extend, i.e., add funcionalities to the Entity Designer in Visual Studio? For instance, I want to right click a property of an entity on the designer and have a new option on the context-menu that allows me to do any stuff I…
Paulo Santos
  • 11,285
  • 4
  • 39
  • 65
1
vote
1 answer

Can't seem to intellisense an entity (entity data framework)

My code is as follows: var contactGroups = context.ContactGroups.Where(cg => cg.ContactID == contact.ID); var MyContactGroups = from cg in context.ContactGroups where cg.Contact == contact.ID select new { Title = cg.Title, …
PKCS12
  • 407
  • 15
  • 41
1
vote
3 answers

Multiple Databases in Ado.net Entity framework for Mysql Provider

I want to have access to 2 different databases in Ado.net Entity framework. I created one .edmx file in project, how can i access two different database in single .edmx file Database provider is MySQL. Regards, venkateswararao
User
  • 11
  • 5