Exemplo n.º 1
0
        private DDD.Simple.Model.User GetUserModel(IDomainEvent <Guid> e)
        {
            if (_user == null)
            {
                _user = _dbConnection.QuerySingleOrDefault <DDD.Simple.Model.User>("Select * From user Where Id = @id", new { id = e.AggregateRootKey });
            }

            return(_user ?? (_user = new DDD.Simple.Model.User()));
        }
Exemplo n.º 2
0
 public override void Save(DDD.Simple.Domain.User aggreateRoot)
 {
     base.Save(aggreateRoot);
     _user = null;
 }