public void AddressDto_Extension_AsEntity_Null() { // Arrange AddressDto address = null; // Act var result = address.AsEntity(); // Assert Assert.IsNull(result); Assert.AreEqual(null, result); }
public GenericServiceResponse <bool> DeleteAddress(AddressDto address) { return(TryExecute <GenericServiceResponse <bool> >((response) => { response.Result = Repository.Delete(address.AsEntity()); if (!response.Result) { var errorMessage = "'DeleteAddress' was unable to delete the given address record."; response.Notifications.AddError(errorMessage); Logger.Error(errorMessage); } })); }