c# - Create one to many association without foreign key -


giving following tables.

project id: int not null pk type: nvarchar(10) not null  someproperty: nvarchar(50)  changerequest id: int not null pk type: nvarchar(10) not nul someproperty: nvarchar(50)  approval id: int not null pk rowid: int not null rowtype: nvarchar(10) not null someproperty: nvarchar(50) 

i want have associations this:

  • project(id, type) -> approval(rowid, rowtype)
  • changerequest(id, type) -> approval(rowid, rowtype)

in way if selecting data database like:

select p*, a.* project p left join approval on a.rowid = p.id , a.rowtype = p.type 

project , changerequest entities different (i put simplified model), both may have 0..n approvals.

is possible map such relations using entity framework?


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -