Ejemplo n.º 1
0
        protected virtual void OnOrganizationChanged(DomainPropertyChangedEventArgs e)
        {
            var old = e.OldValue as Organization;

            if (!old.IsEmpty())
            {
                throw new DomainDrivenException(string.Format(Strings.NotChangeOrganization, this.Name));
            }
            var org = e.NewValue as Organization;

            if (!org.IsEmpty())
            {
                org.AddRole(this);
            }
        }
Ejemplo n.º 2
0
 private static void NameChanged(Book book, DomainPropertyChangedEventArgs args)
 {
 }