示例#1
0
        public virtual void When(IUserLoginMvoStateDeleted e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
        public virtual UserLoginMvoStateDeletedDto ToUserLoginMvoStateDeletedDto(IUserLoginMvoStateDeleted e)
        {
            var dto = new UserLoginMvoStateDeletedDto();

            dto.StateEventId = new UserLoginMvoStateEventIdDtoWrapper(e.StateEventId);
            dto.CreatedAt    = e.CreatedAt;
            dto.CreatedBy    = e.CreatedBy;
            dto.CommandId    = e.CommandId;

            return(dto);
        }
示例#3
0
        protected virtual IUserLoginMvoStateDeleted Map(IDeleteUserLoginMvo c)
        {
            var stateEventId            = new UserLoginMvoStateEventId(c.UserLoginId, c.UserVersion);
            IUserLoginMvoStateDeleted e = NewUserLoginMvoStateDeleted(stateEventId);

            ReflectUtils.CopyPropertyValue("CommandId", c, e);


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;


            return(e);
        }
示例#4
0
        protected virtual IUserLoginMvoStateDeleted Map(IDeleteUserLoginMvo c)
        {
            var stateEventId            = new UserLoginMvoEventId(c.UserLoginId, c.UserVersion);
            IUserLoginMvoStateDeleted e = NewUserLoginMvoStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();


            return(e);
        }
示例#5
0
        public virtual void Delete(IDeleteUserLoginMvo c)
        {
            IUserLoginMvoStateDeleted e = Map(c);

            Apply(e);
        }
示例#6
0
 void IUserLoginMvoState.When(IUserLoginMvoStateDeleted e)
 {
     throw new NotSupportedException();
 }
 public void AddUserLoginMvoEvent(IUserLoginMvoStateDeleted e)
 {
     _innerStateEvents.Add((UserLoginMvoStateDeletedDto)e);
 }