public void RemoveOrganization(OrganizationEntity organizationEntity)
        {
            var result = _directoryContext.OrganizationEntities.SingleOrDefault(p => p.OrganizationName == organizationEntity.OrganizationName);

            _directoryContext.Entry(result).State = EntityState.Deleted;
            _directoryContext.SaveChanges();
        }
        public void UpdateOrganization(OrganizationEntity organizationEntity)
        {
            var result = _directoryContext.OrganizationEntities.
                         SingleOrDefault(p => p.OrganizationId == organizationEntity.OrganizationId);

            if (result != null)
            {
                _directoryContext.Entry(result).CurrentValues.SetValues(organizationEntity);

                _directoryContext.SaveChanges();
            }
        }
 public void AddNewOrganization(OrganizationEntity organizationEntity)
 {
     _directoryContext.OrganizationEntities.Add(organizationEntity);
     _directoryContext.SaveChanges();
 }