WPF and Entity Framework Multiple Foreign Key Issue -
i have 3 entities: codesets, codesettypes, , certifications. layed out follows:
****** object: table [dbo].[codeset] script date: 02/13/2013 14:27:39 ****** set ansi_nulls on go set quoted_identifier on go set ansi_padding on go create table [dbo].[codeset]( [codesetid] [int] identity(1,1) not null, [codesettypeid] [int] not null, [code] [varchar](255) not null, [description] [varchar](255) not null, [insertdate] [datetime] not null, [lastupdatedate] [datetime] null, [logicallydeleted] [int] not null, constraint [xpkcodeset] primary key clustered ( [codesetid] asc )with (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary] ) on [primary] go set ansi_padding off go alter table [dbo].[codeset] check add together constraint [r_6] foreign key([codesettypeid]) references [dbo].[codesettype] ([codesettypeid]) go alter table [dbo].[codeset] check constraint [r_6] go alter table [dbo].[codeset] add together constraint [df_codeset_insertdate] default (getdate()) [insertdate] go ****** object: table [dbo].[codesettype] script date: 02/13/2013 14:28:08 ****** set ansi_nulls on go set quoted_identifier on go set ansi_padding on go create table [dbo].[codesettype]( [codesettypeid] [int] identity(1,1) not null, [codesettypedesc] [varchar](255) not null, [codemaxlength] [int] not null, [codedescmaxlength] [int] not null, [insertdate] [datetime] not null, [lastupdatedate] [datetime] null, [logicallydeleted] [int] not null, constraint [xpkcodesettype] primary key clustered ( [codesettypeid] asc )with (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary] ) on [primary] go set ansi_padding off go alter table [dbo].[codesettype] add together constraint [df_codesettype_insertdate] default (getdate()) [insertdate] go ****** object: table [dbo].[certification] script date: 02/13/2013 14:28:33 ****** set ansi_nulls on go set quoted_identifier on go create table [dbo].[certification]( [certificationid] [int] identity(1,1) not null, [certification_type_id] [int] not null, [classification_code_id] [int] null, [classification_type_code_1_id] [int] null, [classification_type_code_2_id] [int] null, [classification_type_code_3_id] [int] null, [classification_type_code_4_id] [int] null, [insertdate] [datetime] not null, [lastupdatedate] [datetime] null, [logicallydeleted] [int] not null, [exported] [int] not null, constraint [xpkcertification] primary key clustered ( [certificationid] asc )with (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary] ) on [primary] go alter table [dbo].[certification] add together constraint [df_certification_insertdate] default (getdate()) [insertdate] go
my problem here fields certification_type_id, classification_code_id, classification_type_code_1_id, classification_type_code_2_id, classification_type_code_3_id, , classification_type_code_4_id foreign key references codesetid in codeset table.
my question how should set in order able bind in wpf application. have scenario have datagrid bound certifications entity, , on same page there details section bound selected item of datagrid. in details section user able edit selected row of datagrid. ideas here great.
thank you,
rg
i figured out myself.....
wpf entity-framework-4
No comments:
Post a Comment