/// <summary> /// Adds the contact. /// </summary> /// <param name="personContactDetails">The person contact details.</param> /// <returns></returns> public async Task <OperationResultDTO> AddContact(PersonContactDetails personContactDetails) { var dynamicParameters = new DynamicParameters(); dynamicParameters.Add("@FirstName", personContactDetails.FirstName, DbType.String, ParameterDirection.Input); dynamicParameters.Add("@LastName", personContactDetails.LastName, DbType.String, ParameterDirection.Input); var results = (await _db.QueryAsync <OperationResultDTO>( "[dbo].[AddContact]", dynamicParameters, commandType: CommandType.StoredProcedure).ConfigureAwait(false)).FirstOrDefault(); return(results); }
// PUT: api/Contact/5 public async Task <OperationResultDTO> Put(int id, [FromBody] PersonContactDetails contactDetails) { return(await _ourCustomerRespository.SetContact(contactDetails).ConfigureAwait(false)); }