public void PermissionDto_Extension_AsEntity_Null()
        {
            // Arrange
            PermissionDto permission = null;

            // Act
            var result = permission.AsEntity();

            // Assert
            Assert.IsNull(result);
            Assert.AreEqual(null, result);
        }
        public GenericServiceResponse <bool> DeletePermission(PermissionDto permission)
        {
            return(TryExecute <GenericServiceResponse <bool> >((response) =>
            {
                response.Result = Repository.Delete(permission.AsEntity());

                if (!response.Result)
                {
                    var errorMessage = "'DeletePermission' was unable to delete the given permission record.";
                    response.Notifications.AddError(errorMessage);
                    Logger.Error(errorMessage);
                }
            }));
        }