/// <summary> /// Returns the address with the given id. /// </summary> /// <param name="addressId">The address id.</param> /// <returns>The address.</returns> public async Task <AddressDTO> GetAddressByIdAsync(int addressId) { var address = await AddressQueries.CreateGetAddressDTOByIdQuery(this.Context, addressId).FirstOrDefaultAsync(); logger.Info("Retreived address with the given address id [{0}].", addressId); return(address); }
/// <summary> /// Returns the address with the given id. /// </summary> /// <param name="addressId">The address id.</param> /// <returns>The address.</returns> public AddressDTO GetAddressById(int addressId) { var address = AddressQueries.CreateGetAddressDTOByIdQuery(this.Context, addressId).FirstOrDefault(); logger.Info("Retreived address with the given address id [{0}].", addressId); return(address); }