public void ServiceDto_Extension_AsEntity_Null() { ServiceDto service = null; var result = service.AsEntity(); Assert.IsNull(result); Assert.AreEqual(null, result); }
public GenericServiceResponse <bool> DeleteService(ServiceDto service) { return(TryExecute <GenericServiceResponse <bool> >((response) => { response.Result = Repository.Delete(service.AsEntity()); if (!response.Result) { var errorMessage = "'DeleteService' was unable to delete the given service record."; response.Notifications.AddError(errorMessage); Logger.Error(errorMessage); } })); }