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