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
3
votes
0 answers

C# Web API - ADO.NET in .NET Core data collection not returning and does not step through on breakpoint

Good day! I am having a hard time returning data collection with existing data (SQL Server 2012) on .Net Core ADO.NET Entity Model. Also, it does not step through breakpoint on my Ienumerable<>Get() but the breakpoint crosses through public string…
3
votes
2 answers

what 's the use of creating a metadata class and a partial class for the model class c#

I just joined a new company and my manager just joined too, and he wants to change the way we program. basically do what he does. I'm wondering what's the difference, pros, cons, limitation and problems if there'll be any..here's the sample…
3
votes
1 answer

Trouble updating self-tracking entities

I'm using self-tracking entities in a WCF client-server application. My WCF service returns various entities, and these can be updated using corresponding Update methods. This worked well for a while, but now I'm having problems. To keep the focus,…
Tor Haugen
  • 19,509
  • 9
  • 45
  • 63
3
votes
1 answer

Problems with EDM associations

I'm making an OData service and using an EDM to map the structure of my database and specify associations between tables and create Navigation Properties. I've imported my tables into the EDM using the wizard. Things compile fine until I put in…
benwebdev
  • 159
  • 9
3
votes
3 answers

How do i get the top 5 items in a database based on the occurence of a particluar field?

Using Ado.Net Entity framework, I am trying to get the 'top 3' items in a table based on the amount of times they appear in a table. For example: Table: basket_to_product_id | basket_id | product_id I want to see how many times product_id occurs,…
Philip
  • 85
  • 4
3
votes
0 answers

Connect ADO.NET Entity Data Model to Postgresql database

I'm creating an ASP MVC 3 website. I have a Postgresql database - I'm using Entity Framework 6 - I have referenced Npgsql and Npgsql.EntityFramework and installed dotConnect for PostgreSQL. The connection with the Postgresql database works fine -…
3
votes
2 answers

How to implement Login functionality using ASP.NET WebForms and existing SQL Server database?

I have a SQL Server database that I made using Visual Studio's LocalDB. It has 5 tables, one for the Employee information and credentials, one for the location codes of the offices of the company and others for the meetings he attended and the tasks…
3
votes
0 answers

ADO.Net Entity Model - Is there a dialog for selecting the database?

I am looking for the standard dialog that will allow a user to create a database, connect to an existing database, select the database, test connection, etc.. and create the connection string from that. Is there some standard control for this?
esac
  • 24,099
  • 38
  • 122
  • 179
3
votes
2 answers

Get page content dynamically from Sql server database MVC 5

I want to get the info into an li element from SQL Server database in MVC 5 with ADO.NET entity data model. This is my generated model.edmx public partial class Entities : DbContext { public Entities() :…
3
votes
1 answer

Visual studio TFS Project, my models are deleted after update it from database

i am working on visual studio 2012, team project on TFS. after my team members updated database, i tried to get the latest updates on models, i update my models from database, my models is deleted, i tried to refresh tables from database, and get…
3
votes
2 answers

ASP.Net Layered app - Share Entity Data Model amongst layers

How can I share the auto-generated entity data model (generated object classes) amongst all layers of my C# web app whilst only granting query access in the data layer? This uses the typical 3 layer approach: data, business, presentation. My data…
3
votes
1 answer

Web API 2 OData EDM Anomaly

I have the following code: public class AwardTitle { public int AwardTitleId { get; set; } public int? EpisodeId { get; set; } public virtual AwardEpisode Episode { get; …
Chris
  • 1,690
  • 2
  • 17
  • 24
3
votes
1 answer

how do you check open entity framework connections

In Entity Framework 5 with VS2012/VS2013. C# Given the following: using (modelEntities context = new modelEntities()) { //do stuff context.Dispose(); } The using statement is suppose to call Dispose() on its own. I still call dispose on…
3
votes
1 answer

Cannot generate ADO.NET Model classes

I am using Visual Studio Express 2012 for Web. I have created a new empty web site using .net framework 4. I am using SQL Server 2008 R2 Service Pack 2, and I have a database with 4 tables there. When I try to add a new ADO.NET data model into my…
3
votes
1 answer

Update Database from Entity Model without losing content

My question's title should tell you what I am asking about. Is there any way to update my database from an entity model without losing the inserted content? I can't be bothered copying all this stuff every time I make a change.
user293818