/// <summary> /// エンティテイを追加します /// </summary> /// <param name="data"></param> /// <returns></returns> public int Add(FixedTimeEntitie data) { // TODO:SQLクエリーを記載 var query = @" INSERT INTO dbo.FixedTimeEntities values(@FixedTimeValue, @Name, @FixedNumber) "; var result = this._Connection.Execute(query, data); return(result); }
public int Update(FixedTimeEntitie data) { int result = 0; // TODO:SQLクエリーを記載 var query = @" UPDATE dbo.FixedTimeEntities a SET a.FixedTimeValue = @FixedTimeValue a.Name = @Name a.FixedNumber = @FixedNumber where 1 = 1 a.Id = $Id "; // 実行 //result = this._Connection.Execute(query, data); // トランザクション付きで実行 result += this._Connection.ExecuteTransaction(query, data); return(result); }