public async Task BlockClanAsync(BlockClanRequest model) { const string CommandText = @" UPDATE Clans SET IsBlocked = @IsBlocked WHERE Name = @Name;"; Dictionary <string, object> parameters = new() { { "@Name", model.ClanName }, { "@IsBlocked", model.IsBlocked }, };
public async Task BlockClan(BlockClanRequest model) { const string CommandText = @" UPDATE Clans SET IsBlocked = @IsBlocked WHERE Name = @Name;"; var parameters = new Dictionary <string, object> { { "@Name", model.ClanName }, { "@IsBlocked", model.IsBlocked }, }; using (var command = this.databaseCommandFactory.Create(CommandText, parameters)) { await command.ExecuteNonQueryAsync(); } }