public void Create(YdhlYpzd obj) { using (var conn = DbHelper.GetDbConnection()) { conn.Execute(@" IF NOT EXISTS ( SELECT 0 FROM dbo.YDHL_YPZD WHERE XH = @XH ) BEGIN INSERT INTO dbo.YDHL_YPZD ( ID, XH, YPMC, YPJC ) VALUES ( @ID, -- ID - uniqueidentifier @XH, -- XH - int @YPMC, -- YPMC - nvarchar(50) @YPJC -- YPJC - nvarchar(8) ) END", new { ID = obj.Id, XH = obj.Xh, YPMC = obj.Ypmc, YPJC = obj.Ypjc }); } }
public void Create(YdhlYpzd zd) { YpzdMessageForwarder.Forward(new YpzdCreatedMessage(zd)); }
public void Create(YdhlYpzd zd) { MessagePublisher.Publish(new YpzdCreatedMessage(zd)); }
public YpzdCreatedMessage(YdhlYpzd yp) { Yp = yp; }