示例#1
0
        public void JobDto_Extension_AsEntity_Null()
        {
            // Arrange
            JobDto job = null;

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

            // Assert
            Assert.IsNull(result);
            Assert.AreEqual(null, result);
        }
示例#2
0
        public GenericServiceResponse <bool> DeleteJob(JobDto job)
        {
            return(TryExecute <GenericServiceResponse <bool> >((response) =>
            {
                response.Result = Repository.Delete(job.AsEntity());

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