public async Task Update(WindowPostionPersistentObject persistentObject) { const string SQL = "UPDATE liquidity2_extensions_window_postions SET Left = @Left, Top = @Top, Height = @Height, Width = @Width WHERE Id = @Id;"; var connect = factory.Create(); await connect.ExecuteWithTransactionAsync(SQL, persistentObject); }
public async Task Add(WindowPostionPersistentObject persistentObject) { persistentObject.CreateTimeUtc = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); const string SQL = "INSERT INTO liquidity2_extensions_window_postions (Id,TypeFullName,Left,Top,Height,Width,CreateTimeUtc) VALUES (@Id,@TypeFullName,@Left,@Top,@Height,@Width,@CreateTimeUtc);"; var connect = factory.Create(); await connect.ExecuteWithTransactionAsync(SQL, persistentObject); }
public WindowPostion Map(WindowPostionPersistentObject persistentObject) { return(new WindowPostion { Height = persistentObject.Height, Width = persistentObject.Width, Top = persistentObject.Top, Left = persistentObject.Left, Id = Guid.Parse(persistentObject.Id) }); }
public async Task Delete(WindowPostionPersistentObject persistentObject) { await Delete(persistentObject.Id); }