| 1234567891011121314151617181920212223 | using System;using Comal.Classes;namespace Comal.Stores{    public class CustomerStore : SchedulableStore<Customer>    {        protected override void BeforeSave(Customer entity)        {            base.BeforeSave(entity);            StoreUtils.Geocode(entity.Delivery);            StoreUtils.Geocode(entity.Postal);            //UpdateAggregate<Customer>(entity, entity.Account, Count<Customer>(x => x.Sites));        }        protected override void BeforeDelete(Customer entity)        {            base.BeforeDelete(entity);            entity.Account.ID = Guid.Empty;            //UpdateAggregate<Customer>(entity, entity.Account, Count<Customer>(x => x.Sites));        }    }}
 |