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


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

How does DD decide what is a FK and what isn't?

Posted By:      Posted Date: August 23, 2010    Points: 0   Category :ASP.Net
 

Hello,

I watched an intro video on DD, and was impressed with the way that it picked up on a FK in a table, and showed the foreign table's values instead of the ID. I tried this myself with a simple example, and I got IDs displayed.

How does it decide what is a FK and what isn't? For example, I tried a very simple database for tracking user actions. A user can assign an action to another user (or him/herself), and gives start and end dates for the action. Here is the SQL...

create table ActionTypes (
ActionTypeID int not null identity(1,1) primary key,
Description varchar(500) not null default ''
)
go

create table Users (
UserID int not null identity(1,1) primary key,
Title varchar(50) not null default '',
FirstName varchar(50) not null default '',
Surname varchar(50) not null default ''
)
go

create table Actions (
ActionID int not null identity(1,1) primary key,
ScheduledStartTime datetime not null default '1 Jan 1900',
ScheduledEndTime datetime not null default '1 Jan 1900',
ActionTypeID int not null foreign key references ActionTypes(ActionTypeID),
ActionedByUserID int not null foreign key references Users(UserID),
AssignedToUserID int not null foreign key references Users(UserID)
)
go

I created an entity framework model from this, then put a RIA service on top of that. I used the R


View Complete Post


More Related Resource Links

How to decide whne we should use site definition or site template?

  
What is the difference between site definition and site template and whne do use site definition and site template?

Uploading Excel 2007 table into WSS 3.0 - How does SharePoint decide the column that is used to edit

  
Hi, In Excel 2007, there's an option to upload (export) an Excel table into SharePoint.  The range of cells have to be identified as a table.  In the Table ribbon, there's an Export button.  When I upload the Excel 2007 table, SharePoint (WSS 3.0) decides which column in the table will be linked to the properties dialog box for each line in the table.  It seems to be a sporadic decision on the part of SharePoint. Does anyone know how WSS 3.0 decides which column will be linked to properties?  And, is there any way to control this when uploading the file? Thanks!Thanks! Patti N.

Sync Center returns 'Unable to decide if MakeGeneration is needed.'

  

Hi:

We have setup merge replication with our standard edition SQL server 2008 with SQL Express.  We are testing this configuration and when we delete large amounts of data on the subscriber and try to sync via Sync Center, it returns the following error:

'Unable to decide if MakeGeneration is needed.'

It seem, I have some additional configuration that is needed.  Please advise?

Phil


PHuhn
Categories: 
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