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