/// <summary> /// Delete Async a new item. /// </summary> /// <param name="clientIndentifier">PrimaryKey of the view model.</param> /// <param name="payLoad">Payload that comes from the event manager to get a value.</param> /// <returns></returns> public override async Task <bool> DeleteAsync(string clientIndentifier, DataPayLoad payLoad) { var clientData = await _clientDataServices.GetDoAsync(clientIndentifier); if (clientData == null) { return(false); } return(await _clientDataServices.DeleteDoAsync(clientData)); }
public async Task Should_Load_AValid_Client() { // prepare. using (IDbConnection dbConnection = SqlExecutor.OpenNewDbConnection()) { // Arrange value IEnumerable <CLIENTES1> value = await dbConnection.GetAllAsync <CLIENTES1>(); Assert.NotNull(value); var singleValue = value.FirstOrDefault(); Assert.NotNull(singleValue); // Act. IClientData data = await _clientDataServices.GetDoAsync(singleValue.NUMERO_CLI); // Assert Assert.NotNull(data.Value); Assert.NotNull(data.Value.NUMERO_CLI); Assert.AreEqual(data.Value.NUMERO_CLI, singleValue.NUMERO_CLI); } }