相关疑难解决方法(0)

Dapper中间映射

在我之前的问题中略微更高级的映射:)

表:

create table [Primary] (
    Id int not null,
    CustomerId int not null,
    CustomerName varchar(60) not null,
    Date datetime default getdate(),
    constraint PK_Primary primary key (Id)
)

create table Secondary(
    PrimaryId int not null,
    Id int not null,
    Date datetime default getdate(),
    constraint PK_Secondary primary key (PrimaryId, Id),
    constraint FK_Secondary_Primary foreign key (PrimaryId) references [Primary] (Id)
)

create table Tertiary(
    PrimaryId int not null,
    SecondaryId int not null,
    Id int not null,
    Date datetime default getdate(),
    constraint …
Run Code Online (Sandbox Code Playgroud)

c# sql-server orm dapper

9
推荐指数
1
解决办法
5408
查看次数

标签 统计

c# ×1

dapper ×1

orm ×1

sql-server ×1