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