.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

An Entity Relationship Diagram Example

Posted By: Amit Mehra     Posted Date: September 16, 2009    Points: 2   Category :Others
An Entity Relationship Diagram conveys a lot of information with a very concise notation. The important part to keep in mind is to limit what you're reading using the following technique:

Choose two entities (e.g. Company and Employee)
Pick one that you're interested in (e.g. how a single Company relates to employees)
Read the notation on the second entity (e.g. the crow's feet with the O above it next to the Employee entity).

View Complete Post

More Related Resource Links

DataGridComboBoxColumn data binding for an Entity Framework foreign key relationship


I am using Entity Framework and want to show a foreign key relationship in a datagrid using a combobox; I cannot find any good instructions on how to do the data binding.  Here is a simplified example:

City: (CityID, CityName, StateID)  Collection: Cities
State: (StateID, StateName)  Collection: States

The Window constructor:

        public MainWindow()

            /* get a database context for the entity framework */
            MyEntities dbContext = new MyEntities();

            /* bind the data controls */
            this.DataContext = dbContext;

This XAML for the DataGrid will display the State Name as a Readonly Text Column:

                            <DataGrid AutoGenerateColumns="False"

Database Table E-R Entity Relationship Layout - please make suggestions and/or improvements ?


Not quite sure where to post this, but need some help defining a schema and E-R modelling, I'm not sure if I'm maybe making it too complex... 15 Tables in total right now




I have a store which Buys, Sells and Repairs - Laptops and Mobiles and Video Game Consoles and Printers.

This is a walk-in store, so customers can pay cash (and not have their details recorded) or they can pay by card. 


When buying therefore, if ordering via the Internet, customers will have their details recorded and added to the database, but if buying in the store, customers are unlikely to have their details recorded when buying unless they are making a return.

Customers will always have their details recorded when arranging a Repair.


I think I may need separate Orders and Sales tables, because Sales may be connected through an EPOS system, but Orders refers to internet orders, I'm not quite sure about this just now.


All items marked with * denote foreign keys.

So far I have the following table layouts, I'm sure I have missed something:




How do I bind a many to many entity relationship on WPF?



I'm fairly new to WPF, and am having problems working out how to handle a many-to-many relationship in data binding.

Suppose I have a table of Users and a table of Permissions, with a joining table that just has the two IDs. An entry in the joining table means the user has the permission.

I would like to have a list of users in my WPF view, and when you click on one, see a full list of all permissions, with the appropriate ones checked (using checkboxes).

This needs to be two-way, so I can click in the checkboxes and have the changes sent back to the viewmodel, where they can be persisted.

Can this be done with WPF data binding? I can't seem to work it out.

Thanks for any help you can give.

If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Binding WPF Controls to an Entity Data Model

In this interview, programming writer, McLean Schofield, demonstrates how to bind WPF controls to an entity data model, using Visual Studio 2010 Beta 1. You can also learn more in the topic: Walkthrough: Binding WPF Controls to an Entity Data Model.

Creating a Generic Entity Framework 4.0 Repository

With .NET 4.0 right around the corner, I thought it would be cool to download Visual Studio 2010 beta 2 and start playing around with the next release of Entity Framework.

The initial release of Entity Framework came with a great deal of criticism. To make matters worse, there was a large uproar when it was rumored that Microsoft would be abandoning LINQ to SQL, in favor of Entity Framework. This was because, at the time, many developers felt Entity Framework was an inferior technology to LINQ to SQL. To set things right, Microsoft proactively moved forward with improving Entity Framework, in time for the 4.0 release of the .NET Framework. This is good news because my initial impressions, so far, have been nothing but positive.

UML Diagram Types

UML provides a number of diagram types as a mechanism for entering model elements into the model and showing overlapping sets of models elements and their relationships. UML does not specify what diagrams should be created or what they should contain, only what they can contain and the rules for connecting the elements. The diagram types include:

UML Diagram Types - 2

Further diagram types include:

Activity Diagrams - a generic flow chart used much in business modelling and sometimes in use case modelling to indicate the overall flow of the use case. This diagram type replaces the need for dataflow diagrams but is not a main diagram type for the purposes of analysis and design.

Use Case Diagram

The use case diagram shows the functionality of the system from an outside-in viewpoint.

Actors (stick men) are anything outside the system that interacts with the system.

ASP.NET 4.0 Dynamic Data and Many to Many Entity Framework Entities

I did not play much with Dynamic Data controls in VS2008 and just made a cool discovery in VS2010 Beta 2. This may not even be new, but as I'm sitting 30,000+ feet over the Atlantic ocean, I don't have access to VS2008 at the moment to check.

Binding WPF Controls to an Entity Data Model

In this interview, programming writer, McLean Schofield, demonstrates how to bind WPF controls to an entity data model, using Visual Studio 2010 Beta 1. You can also learn more in the topic: Walkthrough: Binding WPF Controls to an Entity Data Model.

Sequential Diagram

Gives Total Exposure On Sequential Diagrma

Entity Framework 4 Tips for WinForms Development

I've been recently working on a smart client (WinForms) application backed by Entitiy Framework 4 (EF4) on Visual Studio 2010. In this blog post I will try to give you some tips regarding some limitations and points to be careful about EF4.

Good way to do a Many-to-Many relationship?


I've used the automatic  Many-to-Many generation as described here: http://msdn.microsoft.com/en-us/library/dd742359.aspx

But that doesn't seem to allow a quantity to be attached to orders (in the example it would be courses). I have many customers and many products, I would like a customer to be able to order more than one product. Right now I get a grid of checkboxes. I would like instead a field where I could enter a number. 

Is this possible?

Can I replace the EntityObject as base-class in Entity Designer 3.5 sp1?


I'm using EF3.5sp1 for a project, and I've been working around many of its problems... as such, my entity partial classes have a lot of logic in them for change-tracking and whatnot.  Obviously, I'd like to factor this logic out into a common base class, but of course all my objects must derive from EntityObject.  Is it possible to tell them to derive from some class of my own invention (which would actually likely derive from EntityObject themselves)?

I'd rather avoid editing the EDMX file unless the changes will be safe on entity-model-update, since I'm still making changes to the database schema in this early state of my project.


Also, is there any good workaround for the fact that the change isn't tracked when you change EntityReference.EntityKey?

I want Er Diagram for Fees System of small institution ,can u plz guide me what fields are necessary


I want Er Diagram for Fees System of small institution ,can u plz guide me what fields are necessary to store Fees information ...


Data accessors or Entity framework


The entlib 5 sugest me to use with data accessors for mapping data from database to my data objects (ORM).

But in .NET 3.5 and especially in .NET 4, I can use in entity framework as ORM methodology for data objects.

What data accessors uses advantages over the entity framework?

What differences that should be affect on my using decisions?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend