dapper model插入数据,非sql插入。

public static void InsertEvent()
        {
            Console.WriteLine("开始查询数据!");
            var eventResult = new DocareBaseDA().GetAll<med_anesthesia_event_all>();
            Console.WriteLine("开始插入数据!");
            var InsertSql = @"insert into med_anesthesia_event_all 
(
PATIENT_ID,
VISIT_ID,
OPER_ID,
ITEM_NO,
ITEM_CLASS,
EVENT_NO ,
ITEM_NAME,
ITEM_SPEC,
DOSAGE_UNITS,
DOSAGE,
ADMINISTRATOR,
START_TIME,
END_DATE,
PERFORM_SPEED,
SPEED_UNIT
)
values (:PATIENT_ID,
:VISIT_ID,
:OPER_ID,
:ITEM_NO,
:ITEM_CLASS,
:EVENT_NO ,
:ITEM_NAME,
:ITEM_SPEC,
:DOSAGE_UNITS,
:DOSAGE,
:ADMINISTRATOR,
:START_TIME,
:END_DATE,
:PERFORM_SPEED,
:SPEED_UNIT
)";
            
            var InsertResult = new DataBaseDA().ExecuteSql(InsertSql, eventResult);
            Console.WriteLine("完成!");
        }

您必须 登录 才能发表评论