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