Exemple #1
0
        public void OrganizationBranchDto_Extension_AsEntity_Null()
        {
            OrganizationBranchDto organizationBranch = null;
            var result = organizationBranch.AsEntity();

            Assert.IsNull(result);
            Assert.AreEqual(null, result);
        }
        public GenericServiceResponse <bool> DeleteOrganizationBranch(OrganizationBranchDto organizationBranch)
        {
            return(TryExecute <GenericServiceResponse <bool> >((response) =>
            {
                response.Result = Repository.Delete(organizationBranch.AsEntity());

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