I've got the following table:
CREATE TABLE [dbo].[Bok_Objekt](
[id] [int] IDENTITY(1,1) NOT NULL,
[KlientId] [int] NOT NULL,
[Typ] [tinyint] NOT NULL,
[Kod] [nvarchar](25) COLLATE Finnish_Swedish_CI_AS NOT NULL,
[Namn] [nvarchar](255) COLLATE Finnish_Swedish_CI_AS NOT NULL,
[Arkiverad] [tinyint] NOT NULL,
CONSTRAINT [PK_Bok_Objekt] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
which I would like to map to a two-level Dictionary like this:
Dictionary<Int32, Dictionary<String, BokObjekt>> mappings = new Dictionary<Int32, Dictionary<string, BokObjekt>>();
The first level dictionary splits the table by the "Typ"-column. The second level dictionary represents all values inside the table with a specific value in the "Kod"-column.
Basically this would lead to a mapping with two map-tags, is this possible at all?
I would really like to avoid having to create subclasses with discriminator values for the Typ-column, as this column can contain upto 100 different values.
|