public void UpdatesUser() { var user = new User { }; command.Execute(user); sqlExecutor .Verify(x => x.ExecuteNonQuery(It.Is <string>(y => y.Contains("UPDATE Users")))); }
public void Update <T>( T entity, dynamic condition = null) where T : class { updateCommand.Execute <T>( entity: entity, condition: condition); }
public T Update <T>(IUpdateCommand <T> command) { if (command.RequiresTransaction && _transaction == null) { throw new Exception($"The command {command.GetType()} requires a transaction"); } return(Retry.Invoke(() => command.Execute(_connection, _transaction), _options)); }
public async Task <IActionResult> Put([FromRoute] Guid id, [FromRoute] string name, [FromRoute] string value, [FromServices] IUpdateCommand <Guid, Story> updateStoryCommand) { await updateStoryCommand.Execute(id, name, value); return(Ok()); }
public async Task <IActionResult> Put([FromRoute] Guid storyId, [FromRoute] int id, [FromRoute] string name, [FromRoute] string value, [FromServices] IUpdateCommand <Guid, int, Option> updateCommand) { await updateCommand.Execute(storyId, id, name, value); return(Ok()); }
public async Task <IActionResult> Put( [FromRoute] Guid storyId, [FromRoute] int featureId, [FromRoute] int optionId, [FromRoute] OptionValueType type, [FromRoute] string value, [FromServices] IUpdateCommand <Guid, int, int, OptionValueType, OptionValue> updateCommand) { await updateCommand.Execute(storyId, featureId, optionId, type, "Value", value); return(Ok()); }