Esempio n. 1
0
        protected virtual IUserRoleStateCreated MapCreate(ICreateUserRole c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId        = new UserRoleEventId(c.UserId, c.RoleId, version);
            IUserRoleStateCreated e = NewUserRoleStateCreated(stateEventId);
            var s = outerState.UserRoles.Get(c.RoleId, true);

            e.Active = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            return(e);
        }// END Map(ICreate... ////////////////////////////
Esempio n. 2
0
        protected virtual IUserRoleStateCreated MapCreate(ICreateUserRole c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId        = new UserRoleStateEventId(c.UserId, c.RoleId, version);
            IUserRoleStateCreated e = NewUserRoleStateCreated(stateEventId);
            var s = outerState.UserRoles.Get(c.RoleId);

            e.Active = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(ICreate... ////////////////////////////
Esempio n. 3
0
 public void Remove(ICreateUserRole c)
 {
     _innerCommands.Remove(c);
 }
Esempio n. 4
0
 public void Add(ICreateUserRole c)
 {
     _innerCommands.Add(c);
 }
Esempio n. 5
0
 void ICreateUserRoleCommands.Remove(ICreateUserRole c)
 {
     _innerCommands.Remove((CreateUserRoleDto)c);
 }
Esempio n. 6
0
 void ICreateUserRoleCommands.Add(ICreateUserRole c)
 {
     _innerCommands.Add((CreateUserRoleDto)c);
 }